How to make Parameters

Abigail Florence

New member
Local time
Today, 01:29
Joined
Nov 7, 2022
Messages
10
I have a number of tables in my database and I am trying to create a query to have a question come up upon clicking it asking a clients name. Once the name is entered, their details from the numerous tables should come up. Would you be able to give me guidance on how to do this please?

Many thanks.
 
make a form,
put a text box,or combo: cboName,

all queries will now use this box as the param:
select * from table where [clientName] = forms!fMyForm!cboName

put all qeries in a macro, run macro.
 
I have a number of tables in my database and I am trying to create a query to have a question come up upon clicking it asking a clients name. Once the name is entered, their details from the numerous tables should come up. Would you be able to give me guidance on how to do this please?

Many thanks.
In your query grid under the Clients name Column put the following in the Criteria row:-

Like "*" & [Enter Clients name required] & "*"
 
Prompting in the query is poor practice. Use the form technique suggested above. That allows you to actually validate the response before passing it to the query.

Also, and even more important, in a database you are building for others, it is dangerous to run queries that the user can interact with UNLESS the query is not updateable. The point of forms is to control data entry and VALIDATE the data as it is entered. You have no control when using a query except for whatever RI you defined for the table and table level validation for each field. And since table level validation is so limited, it is almost useless, most validation will be done using forms.

Users should only interact with forms and reports. If you want to give them something to play with, export the query to a spreadsheet and let them slice and dice it there.
 
Prompting in the query is poor practice. Use the form technique suggested above. That allows you to actually validate the response before passing it to the query.

Also, and even more important, in a database you are building for others, it is dangerous to run queries that the user can interact with UNLESS the query is not updateable. The point of forms is to control data entry and VALIDATE the data as it is entered. You have no control when using a query except for whatever RI you defined for the table and table level validation for each field. And since table level validation is so limited, it is almost useless, most validation will be done using forms.

Users should only interact with forms and reports. If you want to give them something to play with, export the query to a spreadsheet and let them slice and dice it there.
My apologies Pat

I should have also specified that the user should create a Form based on the query.
 

Users who are viewing this thread

Back
Top Bottom