Referencing Text Boxes on forms

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a button on a form, when pressed it generates an event. Whe the event is triggered, I would like to use a variable, that the user enters into a text box on the same form, to query a database. How do I do I reference the text box?
If you have time it would be handy to have an example VB code that generates an SQL statement.
 
I have a button on a form, when pressed it generates an event. Whe the event is triggered, I would like to use a variable, that the user enters into a text box on the same form, to query a database. How do I do I reference the text box?
If you have time it would be handy to have an example VB code that generates an SQL statement.

In the query, as criteria, use the following syntax:

forms!NameOfForm!ControlName
 
Back
Top