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
|
|||
|
|||
Query criteria
Is it possible to set the criteria of a query at runtime rather than in
design view? |
#2
|
|||
|
|||
Query criteria
Steve wrote:
Is it possible to set the criteria of a query at runtime rather than in design view? Certainly it's possible. And easy, too, if you don't mind using VBA. :-) Seriously, you could affect the way a Query runs in various ways, such as setting a control on a Form to have a value that the Query could read, or defining a [Parameters] Table (I usually put just one record in it) containing a field that your Query can read, etc. What do you want the Query to do? How do you want to be able to change how it runs? -- Vincent Johns Please feel free to quote anything I say here. |
#3
|
|||
|
|||
Query criteria
On Sun, 27 Nov 2005 20:32:04 -0800, "Steve"
wrote: Is it possible to set the criteria of a query at runtime rather than in design view? A Parameter Query is a pretty standard technique to do this. Rather than a parameter like "Jones" you can use a prompt in square brackets, such as [Enter last name:] Even better, you can create a Form with unbound controls, and use [Forms]![NameOfForm]!{NameOfControl] as the criterion. The query will look to the form for the user's input. John W. Vinson[MVP] |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
SQL query showing diff between actual and budget | Bon | Running & Setting Up Queries | 3 | August 25th, 2005 12:07 PM |
criteria in a query | Ulcom | Using Forms | 1 | December 16th, 2004 08:49 PM |
Report Criteria: Query works, but report doesn't call up query??? | BARKAROO | New Users | 5 | October 18th, 2004 06:35 PM |
Big number gives error! | Sara Mellen | Running & Setting Up Queries | 8 | October 11th, 2004 02:48 AM |
Specifying no criteria in a query | Big Tony | Running & Setting Up Queries | 1 | August 12th, 2004 01:09 AM |