By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,442 Members | 1,310 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,442 IT Pros & Developers. It's quick & easy.

Form and queries

P: n/a
Hi All,

I have a table, tblCustomers with the following fields: ID, FirstName,
Surname, Age

I have a form which has two text boxes (txtSurname and txtAge) and a button,
plus a detail bar.
In the detail area has to appear all the fields from the table.
The two textboxes are used for queries. What the form has to do is:

If I fill txtSurname with a value and I leave txtAge blank, the form detail
has to show all the customers in the table whose Surname matches the one in
the txtBox.
If I fill txtAge and leave txtSurname blank, in the detail area has to
appear all the customers whose age matches the one in the txtAge.

(And if things don't complicate too much, how about a query which can use
both text boxes - to retrieve records where Surname and Age are as

I don't know if I have to build one or two queries and in case I have to
build two, how can I associate the data in the form to them? I usually have
a single query for a form.

Any advice appreciated.

Nov 13 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.