Setting query parameters from a query

S

Smokey smith

I need step by step instructions on how to get parameters for a query from a
form that is completed by a customer.

Your help will save me fropm insanity

Peter
 
J

John Vinson

I need step by step instructions on how to get parameters for a query from a
form that is completed by a customer.

The simplest way (and you don't describe your existing attempts, the
code you're using, or much else) is to simply include them as explicit
parameters in the Query's definition:

Parameters [Forms]![MyForm]![txtStartDate] DateTime,
[Forms]![MyForm]![cboCustomerID] Long Integer;
SELECT whatever
FROM whereever
WHERE [DateField] = [Forms]![MyForm]![txtStartDate] AND [CustomerID] =
[Forms]![MyForm]![cboCustomerID];

John W. Vinson[MVP]
 
O

OfficeDev18 via AccessMonster.com

In the Criteria line of the Query's grid, put the line

Forms!NameOfOpenForm!ControlName.Value

Notice the "!" between different objects, and dots "." to denote properties.
Don't confuse them!

HTH
 
Top