Combo Box is not requerying

M

Mercadogs

Hello community:

I have a Form with three combo boxes. All three of these combos are
restricted to their lists.
Two of these combos have command buttons below them that open forms that
allows for update of the "lookup table".

I successfully requery the first combobox as to allow the entry of the newly
added
list item, however, I repeat the same requery code for the second combobox
(ofcouse, changing the combobox name), but this code doesn't work for my
second combobox. When I try to input the newly added list item, it still
suggest that the item is not in the list.

Does anyone understand why this requery isn't work?

Please Help,
Gabriel M.

The 1st form (main form) is bound to "MAIN_TABLE" with controls "MainID",
"Ct", "FL", "DFL". "Ct" being the combobox that updates and "FL"
doesn't update(requery).


This is the code syntax that I'm using on the
close event of the lookup tables updating forms:

Private Sub Form_Close()
Forms("Main_Form")![MyCombobox].Requery

End Sub
 
W

Wayne-I-M

Hi - try this instead

Private Sub Form_Close()
Forms!Main_Form!MyComboBox.Form.Requery
End Sub

Hope this helps
 
M

Mercadogs

Thanks Wayne!

I feel like a fool. I had an extra table in by database that I was
unintentionally using
as the lookup table. I was updating the right table, so the requery was
working, I'm
guessing, but I was using the wrong lookup table. Sorry.

Thanks a lot Wayne!

Wayne-I-M said:
Hi - try this instead

Private Sub Form_Close()
Forms!Main_Form!MyComboBox.Form.Requery
End Sub

Hope this helps

--
Wayne
Manchester, England.



Mercadogs said:
Hello community:

I have a Form with three combo boxes. All three of these combos are
restricted to their lists.
Two of these combos have command buttons below them that open forms that
allows for update of the "lookup table".

I successfully requery the first combobox as to allow the entry of the newly
added
list item, however, I repeat the same requery code for the second combobox
(ofcouse, changing the combobox name), but this code doesn't work for my
second combobox. When I try to input the newly added list item, it still
suggest that the item is not in the list.

Does anyone understand why this requery isn't work?

Please Help,
Gabriel M.

The 1st form (main form) is bound to "MAIN_TABLE" with controls "MainID",
"Ct", "FL", "DFL". "Ct" being the combobox that updates and "FL"
doesn't update(requery).


This is the code syntax that I'm using on the
close event of the lookup tables updating forms:

Private Sub Form_Close()
Forms("Main_Form")![MyCombobox].Requery

End Sub
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top