Passing Date to Report

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
 
J

JohnFol

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"
 
C

Chris White

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
 

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