Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2007
    Posts
    17

    Unanswered: after requery event (subform)

    hello
    i have a mainform with three listboxes and a subform inside, the user choses some values in the listboxes and the form requeries based on that values, inside that subform there is a combobox, that combo is populated with its own query, the problem i have is that when the user choses diferent values in the listboxes and the subform requeries, the combobox doesn't requery to show the correct values, it only does so when i open the mainform the very first time, i've tried to put combobox.requery in the Current event of the subform and the NotInList event of the combobox without results,

    could you tell me how can i do to have the combobox update its values after the subform requery??

    thanks for your advise

  2. #2
    Join Date
    Sep 2004
    Posts
    47
    Try Me.Refresh

  3. #3
    Join Date
    Feb 2007
    Posts
    17
    thanks for your reply astrosapiens, i tried to put that code in the combobox but it says it doesn't have that method. could you be a little more specific please?, i'm not sure what events are the best to do this

    thanks for your advise

  4. #4
    Join Date
    Feb 2004
    Location
    Chicago, IL
    Posts
    1,312
    You have to requery the combo box on the subform. To do this you will need to do something like:

    Me.SubformName.Controls("ComboBoxName").Requery

    I don't know the names of your subform and combobox, so replace the exact names in the appropriate places.

    You should put this code in the Main form.

  5. #5
    Join Date
    Feb 2007
    Posts
    17
    i finally got it to work, thanks for your help

Posting Permissions

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