link a txtbox with a query

O

Orlando

Hi guys, I am working in an Access Project and I want to connect one textbox
I have in the form with the criteria in the query (View) for the row source
for a combo box in the same form, what I want is for reduce the amount of
records shown in the combo box. I typed this lines in the criteria of the
fieldcategory in the query,
= [forms]![frmPopAddProductOrRecipe]![txtCategory]

but it doesn't recognize it.
 
A

Andy Hull

Hi Orlando

The combo box needs to be requeried whenever your text box is changed. Use
the After Update event of your text box like...

Private Sub txtCategory_AfterUpdate()
Me.comboBoxName.Requery
End Sub


Regards

Andy Hull
 
Top