Microsoft Office Tutorials and References
In Depth Information
Linking a form to a query
Linking a form to a query
A popular design technique in creating a user interface is to
use a method often called query by form . The idea is to create a
query that has filter criteria that directly references one or more
controls on a form. The user then types a value into the control
on the form and clicks a button on the form, which opens either
a query or a form/report based on a query, where the query
links back to filter by the value entered on the form.
In our example, we will make the form open the query, but you
could easily change this to open a form or report based on that
query.
3
1
2
Link a form to a table or query
1 With a form in Design view, add a text box control. This text box will
contain a value that will be used to filter data in a query.
2 Type a name for the text box control. (Naming controls will make
creating expressions easier when you have several controls on a
form.)
3 Save the form, but do not close it.
4 Create a query, and choose a field that will be filtered against the
data in the control on the form we created.
5 Save the query.
6 Click in the Criteria row, in the column against which we’ll be
filtering the data.
7 Click Builder to open the Expression Builder popup window.
(continued on the next page)
5
4
7
6
Search JabSto ::




Custom Search