Results 1 to 4 of 4
  1. #1
    msmithtlh is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2013
    Posts
    125

    Requery for cascading combo boxes

    I have 2 combo boxes. The values available in combo box 2 are dependent on the value selected in combo box 1. This works fine for a new record.



    However, if I change the value in combo box 1, the values available in combo box 2 are not correct for the new value in combo box 1.

    I suspect I need a "requery" command. I have tried this, attaching it to different properties, but can't get it to work correctly. Which combo box and what property should the requery action be associated with???

    If requery is not what is needed, please advise what is needed.

    Thanks!!!!!!

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    48,667
    Use combo 1 AfterUpdate and/or combo 2 GotFocus as well as form Current events.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    ranman256's Avatar
    ranman256 is online now VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    7,889
    Code:
    sub cboBox1_afterupdate()
     cboBox2.requery
    end sub

  4. #4
    msmithtlh is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2013
    Posts
    125
    Thanks!!!!!!!!!!!

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

Similar Threads

  1. Replies: 1
    Last Post: 10-31-2018, 01:14 PM
  2. Cascading combo requery issues
    By ccook241 in forum Database Design
    Replies: 5
    Last Post: 10-30-2018, 06:38 PM
  3. Requery with cascading combo boxes
    By TanyaH in forum Forms
    Replies: 8
    Last Post: 04-21-2013, 07:12 AM
  4. cascading combo boxes, .requery not working
    By jsmath22 in forum Forms
    Replies: 8
    Last Post: 10-12-2012, 12:28 PM
  5. Cascading Combo Boxes Requery Problem
    By Jo22 in forum Forms
    Replies: 9
    Last Post: 01-28-2012, 09:41 AM

Posting Permissions

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