How to use Text box content in a form query?

  • Thread starter Thread starter keithb
  • Start date Start date
K

keithb

I have a form based on a query where each record is displayed on one row.
This form contains an unbound textbox that I want to use to select which
records get displayed in the form. I have tried using
[forms]![formname]![textboxname]![Text] in the Query WHERE clause, but that
does not work.

Can someone tell me how to pass the content of the unbound text box in a
form to the query used as a data source for that form?

Thanks,

Keith
 
I have a form based on a query where each record is displayed on one row.
This form contains an unbound textbox that I want to use to select which
records get displayed in the form. I have tried using
[forms]![formname]![textboxname]![Text] in the Query WHERE clause, but that
does not work.

Can someone tell me how to pass the content of the unbound text box in a
form to the query used as a data source for that form?

Thanks,

Keith

In Access it is the control's Value property you need to use, not it's
Text property. Since the Value property is the Default, you do not
need to explicitly write it:

[forms]![formname]![textboxname]

The form must be open when the query is run.

If you still have a problem, it would be in your interest to copy and
paste into your reply the exact query SQL.
 
Back
Top