Passing Date to Report

  • Thread starter Thread starter Chris White
  • Start date Start date
C

Chris White

This is driving me crazy.

Movie Database
I'm trying to print a report of releases for a given date, why is this so
hard?
Release_Date is formatted as "Short Date"

I have a simple form with Combo of Distinct Release_Dates and an Preview
Report button created with wizard. Even though Release_Date is formatted as
"Short Date", I was getting multiple dates in the combo, so here is the
combo source:
SELECT DISTINCT CDate(Format([Products]![Release_Date],"Short Date")) AS
RDate FROM Products ORDER BY CDate(Format([Products]![Release_Date],"Short
Date")) DESC;

I've tried parameters, filter and where clause in Open Report and a bunch of
other stuff and gotten numerous errors that I won't get into.

How do I do this?

Frustrated,
Chris
 
ALL dates are stored as numbers in the DB. The Format just displays the
number in certain ways.
Do the following in the combo:
Rowsource = "SELECT DISTINCT [Release_Date] AS RDate FROM Products ORDER BY
Release_Date Desc"
Format = "Short Date"
 
Thanks for your reply. That helped solve that issue.
I still have the larger issue. How exactly to filter my report by the date
specified in this combo box.

Thanks,
Chris

JohnFol said:
ALL dates are stored as numbers in the DB. The Format just displays the
number in certain ways.
Do the following in the combo:
Rowsource = "SELECT DISTINCT [Release_Date] AS RDate FROM Products ORDER BY
Release_Date Desc"
Format = "Short Date"


Chris White said:
This is driving me crazy.

Movie Database
I'm trying to print a report of releases for a given date, why is this so
hard?
Release_Date is formatted as "Short Date"

I have a simple form with Combo of Distinct Release_Dates and an Preview
Report button created with wizard. Even though Release_Date is
formatted
as
"Short Date", I was getting multiple dates in the combo, so here is the
combo source:
SELECT DISTINCT CDate(Format([Products]![Release_Date],"Short Date")) AS
RDate FROM Products ORDER BY CDate(Format([Products]![Release_Date],"Short
Date")) DESC;

I've tried parameters, filter and where clause in Open Report and a
bunch
of
other stuff and gotten numerous errors that I won't get into.

How do I do this?

Frustrated,
Chris
 
Back
Top