Results 1 to 5 of 5
  1. #1
    gaurav2310 is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2014
    Posts
    5

    Post Updating combo box value based on another combo box value

    Hi All,
    I have a table in which I have following fields:-
    1. Region
    2. Country
    3. VendorName


    I want to create a form which will filter the data based on selection in previous form. (I dont want user to make any changes on the form i.e. Add,Edit or Delete) Hence i have kept all the fields on the form as "unbound".

    In my form I have CboRegion , CboCountry

    For CboRegion i have created a select query which will filter data and shows me unique value. This part is working absolutely fine.

    For CboCountry i have created parameter query based on selection made by user in CboRegion. The query name is QrySelectCountry which is showing under Row Source property.

    When i run the form and i select item in CboRegion the data in CboCountry is popping up correctly, but when i change the value in CboRegion the data is not updating in CboCountry. (If i hit F5 it is working fine but not updating automatically).

    I tried afterupdate and change event of CboRegion by putting Me.Cbocountry.Requery or DoCmd.OpenQuery "QrySelectCountry" but still the data in CBoCountry is not updating.



    Could you please help me on what I am missing or what needs to be done so that my fields will pop up data automatically.

    Thanks & Regards,
    Gaurav

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    Perhaps you can add code in the On After Update event of CboCountry that will Requery the CboCountry combo.

  3. #3
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    Country/Region/State etc is often handled with cascading comboboxes.
    Here is a free video tutorial (Access 2003 or so) that has the details of creating Cascading Comboboxes.

    Other info re comboboxes.

    Good luck with your project.

  4. #4
    gaurav2310 is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2014
    Posts
    5
    Thanks Itsme and Orange.

    The video just works fine for me.

    Regards,
    Gaurav

  5. #5
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    ItsMe and I were happy to help.
    Good luck with your project.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 4
    Last Post: 06-09-2014, 10:34 AM
  2. Replies: 3
    Last Post: 07-03-2013, 10:38 AM
  3. Replies: 1
    Last Post: 10-30-2012, 10:29 AM
  4. Replies: 1
    Last Post: 07-11-2012, 08:36 AM
  5. Updating subform based on combo box change
    By kev921hs in forum Forms
    Replies: 3
    Last Post: 04-01-2010, 08:43 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums