How to Keep Combos requeried when viewing and editing records.

Discussion in 'Microsoft Access VBA Modules' started by scorpioncoll, Apr 17, 2010.

  1. scorpioncoll

    scorpioncoll

    Joined:
    Apr 17, 2010
    Messages:
    1
    Likes Received:
    0
    I have a CustomerID Combo on my form and in the after update event it successfully requeries a ContactsID Combo on the same form.

    My question is when later viewing or editing the records - for example using the navigation buttons and selecting a record the ContactsID Combo although it shows the correct selection initially made, say I wish to change the contact to another person, the ContactsID Combo will display all possible contacts to choose from and not just the ones related to the CustomerID.

    What code would I need to use so that when I go back and view/edit a Customer the ContactsID is requeried just to show all possible contacts just for the CustomerID.

    At the moment when editing the record I am manually selecting CustomerID which fires the After Update Event to requery the ContactsID Combo

    Many thanks in advance
    Andrew
     
    scorpioncoll, Apr 17, 2010
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. DOYLE60

    How to Activate Command Button When Two Combos Are Not Null

    DOYLE60, Nov 30, 2004, in forum: Microsoft Access VBA Modules
    Replies:
    7
    Views:
    215
    John Spencer (MVP)
    Dec 2, 2004
  2. doyle60@aol.com

    How to get requeried main form to keep subform in same place

    doyle60@aol.com, Jul 8, 2005, in forum: Microsoft Access VBA Modules
    Replies:
    3
    Views:
    266
    doyle60@aol.com
    Jul 11, 2005
  3. Guest
    Replies:
    7
    Views:
    232
    Guest
    Dec 3, 2005
  4. ant1983

    Cascading Combos

    ant1983, Feb 8, 2008, in forum: Microsoft Access VBA Modules
    Replies:
    1
    Views:
    152
    Daniel Pineault
    Feb 8, 2008
  5. Attos

    Cascaded combos control in a datasheet format subform

    Attos, Jul 6, 2008, in forum: Microsoft Access VBA Modules
    Replies:
    1
    Views:
    239
    strive4peace
    Jul 7, 2008
Loading...

Share This Page