View Full Version : Transfering from From - Query


ebartlett
05-28-2002, 07:21 AM
I need to know how to properly transfer data from my search form to my query. Some Forms I need to have options where it will take what they enter and return anything close to it, others I need it to only return what they enter in the form, and some I have a drop down menu for them to select from. I need to put all the options they pick into a query to search but not make them select all of them for it to work. How do I do this?

Hayley Baxter
05-28-2002, 07:37 AM
Have you tried looking up using multiple criteria in a query from access help, this proves to be quite useful and gives you plently examples of criteria using AND and OR.

ie Like * would return all records
OR
Like st would show records only with st

Try to get the correct results showing in your query first by choosing to view the results.

Hayley

ebartlett
05-28-2002, 12:01 PM
Can you link the field in the form to the criteria field in the querie? and have it as a control source? would that be my best bet? and how would I make the query a control source?

ebartlett
05-28-2002, 12:05 PM
Can you link the field in the form to the criteria field in the querie? and have it as a control source? would that be my best bet? and how would I make the query a control source?

Hayley Baxter
05-28-2002, 11:42 PM
Yes you can, you can have a combo box in your form. In your query under the correct field name you can type in the criteria

[forms]![yourformname]![yourcomboboxname]

or if it makes it any easier right click and select build then you can choose the frmname etc from the list and access will do the rest.

Hayley