Results 1 to 5 of 5
  1. #1
    Join Date
    Sep 2004
    Location
    Atlanta, GA
    Posts
    62

    Unanswered: filtering a subform from an "entry" form

    I have a form (cinfo) that opens when you open the DB, from this form you choose a patient name, or ID number.
    I have a button with an open form macro attatched to it that opens the form i need (palsmain) at the correct record +1 for some reason btu ill address this later, all good so far... however i have a subform within this form (TabCtl10) that has 9 other forms in it in different tabs.

    This is what i have in the macro,
    Form name --palsmain
    View --form
    filternam --select palsmain.*
    Where condition -- [palsmain].[id]=[Forms]![clientinfo]![cid]
    Data mode --edit
    window mode --normal

    My problem is that its opening the palsmain form at the specified cleint,but the subforms are blank (no info).

    Ive tried adding the other forms to the existing macro but it just opens them seperate to palsmain form.

    any help with this would be greatly appretiated

    Brownie

  2. #2
    Join Date
    Sep 2005
    Location
    Utah
    Posts
    136
    I've run across this a few times with some of my databases and when I find the problem it's usually something as simple as miss-spelling the name of a field or form or something with the relationship of my tables.

    That's where I always start looking, sometimes I pass right by it the first time I look but then find it later. I also look at my queries to make sure the form and control name in my criteria line is spelled correctly.

  3. #3
    Join Date
    Sep 2005
    Location
    Utah
    Posts
    136
    Can you tell me what tables are in your subform? Are the subforms based off queries?

  4. #4
    Join Date
    Sep 2005
    Location
    Utah
    Posts
    136
    I have a database where I have a relationship between my Patients table and my Visits table. And another relationship between my Patients table and my Authorizations table.

    Both relationships are a one-to-many and both join types show all records from the Patients table and only those records from the Visits table where the Patient ID matches and only those records from the Authorizations table where the Patient ID matches.

    I have a selection form where the user selects a patient from a list, the command button on this form opens my Patients main form. Inside the main form I have two subforms.

    The main form is based off a query. Inside the query in the crieteria line of the patient's name I reference my selection form and the name of the control where the user selects the patient's name.

    My main form opens and shows all the approriate records in the subforms.

  5. #5
    Join Date
    Sep 2004
    Location
    Atlanta, GA
    Posts
    62
    Got it working thanks, the worst part is im not sure how i did it??

    Im going to look at it tonite and ill re post thanks

    B

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •