1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Basing one combo box on another

Discussion in 'Business Applications' started by neuro1, Oct 14, 2008.

Thread Status:
Not open for further replies.
Advertisement
  1. neuro1

    neuro1 Thread Starter

    Joined:
    Oct 14, 2008
    Messages:
    9
    Hi,

    I have a form with patient demographics, and a subform for each admission episode. On the subform, I have diagnosis category combo box and a subcategory combo box which should update depending on the category selected.

    However, having done [forms]![Diagnosis subcategory]![Diagnosis category], and applying me.[Diagnosis subcategory].Requery in the AfterUpdate, I am still unable to get it to work.

    I am also unable to select the Diagnosis category from the combo box, despite being able to view all the selections.

    Help would be much appreciated - the DB is 420kb at present.

    Cheers
     
  2. OBP

    OBP

    Joined:
    Mar 8, 2005
    Messages:
    19,895
    Is the first Combo for Diagnosis category "Bound" to a Field on the Form and does it match the type of field that it is bound to?
     
  3. neuro1

    neuro1 Thread Starter

    Joined:
    Oct 14, 2008
    Messages:
    9
    Hi OBP,

    I think so - when I re-created the form, I dragged the Diagnosis field from the field list onto the form, changed it into a combo box, and selected the table (where I had all the Diagnosis) as the Row Source. Therefore I figure it must be bound. The field type for Diagnosis is text. Is that correct?
     
  4. neuro1

    neuro1 Thread Starter

    Joined:
    Oct 14, 2008
    Messages:
    9
    Hm, I just found out that the same has happened to all the combo boxes on the revised Admission form. That is despite recreating the form using the wizard. The combo boxes display the options, but when I click on the options, an error sound goes off and the selection cannot be made.
     
  5. OBP

    OBP

    Joined:
    Mar 8, 2005
    Messages:
    19,895
    neuro, what version of Access are you using?
    If it is NOT Access 2007 can you take a zipped copy and post it on here as an attachment using the "Go Advanced" and "Manage Attachments" buttons?
    If it is Access 2007 can you ask access to convert it to Access 2000 or Access 2003 and then zip it up?
     
  6. neuro1

    neuro1 Thread Starter

    Joined:
    Oct 14, 2008
    Messages:
    9
    Attached is zip file. Thanks.
     

    Attached Files:

  7. OBP

    OBP

    Joined:
    Mar 8, 2005
    Messages:
    19,895
    Ok I will post something tomorrow.
     
  8. OBP

    OBP

    Joined:
    Mar 8, 2005
    Messages:
    19,895
    neuro1, I am sorry for the delay, I have been busy doing Household things.
    I think this does what you want.
    I have re-arranged the Category / SubCategory Links, also rebuilt your Combos and based your Admissions form on a Query.
    I have added a Form/Subform for adding Editing the Category / SubCategory fields, also based on Queries.
     

    Attached Files:

  9. neuro1

    neuro1 Thread Starter

    Joined:
    Oct 14, 2008
    Messages:
    9
    Hi OBP,

    No worries about the delay. I'm quite confused by what you've done on the form. I've simplified the database - there was a lot of duplication. I'm not bothering with the diagnosis codes now; I've rewritten my diagnosis and diagnosis headings (clearer like this). I still cannot get the diagnosis combo box to display the diagnoses relevant to the diagnosis headings combo box in the Admission form. I hope that's clearer. Appreciate your help. Thanks.
     

    Attached Files:

  10. OBP

    OBP

    Joined:
    Mar 8, 2005
    Messages:
    19,895
    If you look at the Query Select Diagnosis Subcategory that I used for linking the 2 Combos on the version that I posted you will see that I used
    [forms]![Demographics]![Admission]![Diagnosis]
    not
    [Forms]![Admission]![DiagnosisheadingID]

    When a Form is a Subform on a Main form you have to include the Main form's name in the Query Criteria.
     
  11. neuro1

    neuro1 Thread Starter

    Joined:
    Oct 14, 2008
    Messages:
    9
    Tried that. The Diagnosisheading combo displays ok, but a message "Enter Parameter Value Forms!Demographics!Admission!Diagnosisheading" displays when I click on the Diagnosis box.
     
  12. OBP

    OBP

    Joined:
    Mar 8, 2005
    Messages:
    19,895
    That means that the name is not correct, have you changed the name of the Admission Form?
     
  13. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Similar Threads - Basing combo another
  1. SBaird
    Replies:
    6
    Views:
    699
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/759080

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice