Full Version: Combo Box Based On Query
UtterAccess Forums > Microsoft® Access > Access Forms
Hello UA,
Thanks to you guys I think I am close to having a well rounded understanding of Access but I have yet another question. I have a form with a combobox on it. The source of the combobox is a query. In the criteria of the query I have the expression in my criteria Like Forms![myForm]![mySubForm]!myField. When I select the combobox the first time I get the data that matches the criteria that is based on a field in the form where the combobox is. If I make an error on the form and need to go back to the combobox the results are still the same even if criteria on the form has changed. Any ideas?
When you change the criteria on the form you need to requery the combo box;
In the after update event of the criteria control you will need e.g.
Me.YourComboBoxName = Null '(as your entered value may no longer be valid)
Thank you very much....It did indeed help. I thought it might have been something with the after event. Thanks!
Good luck with your project.
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.