Pass Calculated Parm to Query

T

Terry Higgins

New at this - I want to use a select query to output and excel file. The
query needs to use a start date and end date within a joined table on an
AS400. The dates on the AS400 are YYYYMMDD. I figured out how to calculate
my start date and end date based off the current date, but how do I get this
automatically into a query where the criteria is Between [StartDate] and
[EndDate].

This is how I am getting the StartDate
Format (Date-7,"YYYYMMDD")

This is how I am getting the EndDate
Format (Date-1,"YYYYMMDD")
 
G

Guest

you are a little foggy on how and where you are getting
the calculated results.
one suggesting - put the results in hidden text boxes on
your form. then have your query use the hidden text boxes
as criteria.
example
.....where Startdate >= [forms]![YourFormName]!
[StarthiddenControlName] and <[Forms]![YourFormName]!
[EndHiddenControlName]
 
J

jrhyne2584

Why don't you just use that formula as part of the query?

Terry said:
*New at this - I want to use a select query to output and excel file
The
query needs to use a start date and end date within a joined table o
an
AS400. The dates on the AS400 are YYYYMMDD. I figured out how t
calculate
my start date and end date based off the current date, but how do
get this
automatically into a query where the criteria is Between [StartDate
and
[EndDate].

This is how I am getting the StartDate
Format (Date-7,"YYYYMMDD")

This is how I am getting the EndDate
Format (Date-1,"YYYYMMDD")


-
jrhyne258
 

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