Pass Calculated Parm to Query

  • Thread starter Thread starter Terry Higgins
  • Start date Start date
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")
 
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]
 
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
 
Back
Top