How do I pass a parameter from a form to a query?

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

Guest

Hi

I am struggling with what seems like should be a straightforward task.
Unexpectedly however it has become an infuriatingly difficult one (no doubt
due to my complete novice status).

I have a very basic d/base (3 tables) that I have been searching using basic
SQL queries. I want to create a simple 'search' form that produces the
results of my various queries without the need to work in SQL. Enter one or
more search criteria, hit ENTER, results presented in datasheet perhaps?

Thought this would have been easy but I've had no luck. Can you please
explain how I can pass a parameter from a form to a query?

Many thanks
 
Use the value on the form as a filter for your query.
If you were to enter a CustomerIDNo in a field called CustID on your
form, use this criteria against the CustomerIDNo field in your query...
=Forms!frmYourFormName!CustID
hth
Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top