Trivial Question (User input into queries)

G

Guest

I am a new Access user and relatively inexperienced database user. I seem to be having a problem with Access'es "design paradigm". As simple as it seems to be, I am stuck on the question of how to capture user input and feed it into a query. I am talking really simple stuff like "get a single date from the user" and then generate the query "show all the stuff on the data that the user just entered". A text box on a form would seem to be the right approach, but I can't figure out how to link that input into the query.

Thanks

dave
 
D

Duane Hookom

All objects (forms, reports, tables, queries, controls, etc) have a name.
You would use the names of the form and control in the criteria like:
=Forms!frmYourFormName!txtYourDateTextBox

--
Duane Hookom
MS Access MVP


Dave Lee said:
I am a new Access user and relatively inexperienced database user. I seem
to be having a problem with Access'es "design paradigm". As simple as it
seems to be, I am stuck on the question of how to capture user input and
feed it into a query. I am talking really simple stuff like "get a single
date from the user" and then generate the query "show all the stuff on the
data that the user just entered". A text box on a form would seem to be the
right approach, but I can't figure out how to link that input into the
query.
 
C

Colin Foster

Hi Dave,
I think that you are needing what is called a "Parameter Query"

First of all, you set up your query as normal, then in the criteria field
for the information that you want the user to input (such as a date) you use
the following...

Like [Enter your date here]

This will throw up a dialog box with whatever you have typed within the
square brackets ([]) as the instruction. When the user has input the
required information (in this case the date) Access will then run the query
based on that criteria.

Hope this helps
Regards
Colin Foster

Dave Lee said:
I am a new Access user and relatively inexperienced database user. I seem
to be having a problem with Access'es "design paradigm". As simple as it
seems to be, I am stuck on the question of how to capture user input and
feed it into a query. I am talking really simple stuff like "get a single
date from the user" and then generate the query "show all the stuff on the
data that the user just entered". A text box on a form would seem to be the
right approach, but I can't figure out how to link that input into the
query.
 

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

Top