Dates problems



Hi,

I've a dialog form which interacts with a stored procedure to select a range
of dates. A command moves the data to a report, in theory, but it's not
working.

SELECT dbo.CLAIMS.CLAIM_ID, dbo.CLAIMS.NAME,

dbo.CLAIMS.DATE_IN,

dbo.CLAIMS.SALESMAN_ID

FROM dbo.CLAIMS

WHERE (dbo.CLAIMS.CLAIM_ID = @Salesman) AND

(CAST(dbo.CLAIMS,DATE_IN AS datetime) BETWEEN @D_Start AND @D_End)

The dates are stored in yyyymmdd format for which -> CAST.

The report is blank (no info and no errors), however, when using the Query
Analyzer, the script works fine. Of course, replacing the variables (@) with
fixed data.

What am I doing wrong?

TIA

Ana


.



Relevant Pages

  • Problem with dates
    ... I've a dialog form which interacts with a stored procedure to select a range ... A command moves the data to a report, in theory, but it's not ... The report is blank, however, when using the Query ...
    (microsoft.public.access.forms)
  • delay in Print Preview
    ... The command button runs a stored procedure on the SQL ... When the report comes up ... design mode then minimize it, I can click the command button to print ...
    (comp.databases.ms-access)
  • Re: Change Parameter Type?
    ... It sounds like you are using a stored procedure, what you can do is redesign ... your report to use a Command that calls the sp. ... Standard Report Creation Wizard. ...
    (microsoft.public.vb.crystal)
  • OpenReport with WHERE clause not filtering data
    ... I have created a report with the datasource being a Stored Procedure ... I am opening the report with the DoCmd.OpenReport command and a WHERE ...
    (microsoft.public.access.reports)
  • Re: Printer Control and Print/Preview Problems
    ... to be appended to the report print stream. ... or "Print" with the DoCmd.OpenReport command, ... still open preview window. ... > following that with an OpenReport using acNormal. ...
    (microsoft.public.access.reports)

Loading