ComboBox RowSource Requery

  • Thread starter Thread starter Casey
  • Start date Start date
C

Casey

I have a combo box that I use a query as a rowsource
for. The combo box is located on a subform of another
form (main form). The query has criteria in its one and
only field. The criteria refers to two controls on the
main form. The criteria looks something like this.

[Forms].[mainform].[text1] or [Forms].[Mainform].[Text2]

When I open the main form that holds the sub form,
and go to the subform to use the combo box, it works fine
on the first record. But when I go to another main form
record, and go to the sub form again to use the combo box,
the combo box lists the same choices.

Is there a way that I can requery the query that I am
using for this combo box?

I would be really glad to find a successful answer.

If you know how to solve this type of situation,
please let me know the advice.

I really appreciate any help.

Thank you,

Casey
 
Casey said:
I have a combo box that I use a query as a rowsource
for. The combo box is located on a subform of another
form (main form). The query has criteria in its one and
only field. The criteria refers to two controls on the
main form. The criteria looks something like this.

[Forms].[mainform].[text1] or [Forms].[Mainform].[Text2]

When I open the main form that holds the sub form,
and go to the subform to use the combo box, it works fine
on the first record. But when I go to another main form
record, and go to the sub form again to use the combo box,
the combo box lists the same choices.

Is there a way that I can requery the query that I am
using for this combo box?

Place the Requery in the AfterUpdate events of the Text1 and
Text2 controls.
 
Back
Top