If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
I need to build a query that asks for a record
I would like to build a query so that when you open it, it asks you for
information before it can open the query. I think it has something to do with expression builder, but I'm not sure of the code. Example: Clicking on the query then access asking you for product number. You type it in then only those items appear. Thanks in advance! |
#2
|
|||
|
|||
I need to build a query that asks for a record
Parameter queries ask you to input information and uses that information in
the query. Read your help files for parameter queiries. "Gina" wrote: I would like to build a query so that when you open it, it asks you for information before it can open the query. I think it has something to do with expression builder, but I'm not sure of the code. Example: Clicking on the query then access asking you for product number. You type it in then only those items appear. Thanks in advance! |
#3
|
|||
|
|||
I need to build a query that asks for a record
On Fri, 11 Jul 2008 05:55:01 -0700, Gina
wrote: I would like to build a query so that when you open it, it asks you for information before it can open the query. I think it has something to do with expression builder, but I'm not sure of the code. Example: Clicking on the query then access asking you for product number. You type it in then only those items appear. Thanks in advance! Golfinray is correct: you need a parameter query. Fortunately they're easy. You don't need the expression builder at all. Instead, just create a Query selecting the fields that you want to see and to search. In the query grid, on the Criteria line under the [Product Number] field, put [Please enter product number:] When you run the query you'll be prompted with the text between the brackets, and the user's entry will be used as the criterion. Better: create a little form frmCrit with a combo box selecting all the valid product numbers (cboProduct let's call it). Use a criterion of =[Forms]![frmCrit]![cboProduct] Put a command button on frmCrit to open whatever Form or Report uses your query; select the product, and click the button. Note that users should in general never need to see a Query or a Query datasheet! -- John W. Vinson [MVP] |
Thread Tools | |
Display Modes | |
|
|