From: SSi308 on
I am trying to create a dialogue form which asks for start date and end date
and includes a button to run a report. My goal is to enter the dates only
once to run the report. Currently I have the date parameters set in the two
queries and have to enter the date range twice when running the report. I
tried following several answers to similar questions but now when opening the
form and entering the dates I am prompted to re-enter the dates 3 times!

The report I am ultimately trying to run consists of a main report,
rptCallVolume, and a subreport, rptContractsAndHours.
Each of those reports are based on a parameter query:
rptCallVolume
Field: CallDate
Table: DailyCalls
WHERE [CallDate] >= Forms!ReportGen!txtStartDate
AND [CallDate] < DATEADD("d",1,Forms!ReportGen!txtStartDate)

rptContractsAndHours
Field: DateOfRecord
Table: ContractsAndHours
WHERE [DateOfRecord] >= Forms!ReportGen!txtStartDate
AND [DateOfRecord] < DATEADD("d",1,Forms!ReportGen!txtStartDate)

I can also post the SQL View if that will help. Thanks for any assistance.
From: Marshall Barton on
SSi308 wrote:

>I am trying to create a dialogue form which asks for start date and end date
>and includes a button to run a report. My goal is to enter the dates only
>once to run the report. Currently I have the date parameters set in the two
>queries and have to enter the date range twice when running the report. I
>tried following several answers to similar questions but now when opening the
>form and entering the dates I am prompted to re-enter the dates 3 times!
>
>The report I am ultimately trying to run consists of a main report,
>rptCallVolume, and a subreport, rptContractsAndHours.
>Each of those reports are based on a parameter query:
>rptCallVolume
>Field: CallDate
>Table: DailyCalls
>WHERE [CallDate] >= Forms!ReportGen!txtStartDate
>AND [CallDate] < DATEADD("d",1,Forms!ReportGen!txtStartDate)
>
>rptContractsAndHours
>Field: DateOfRecord
>Table: ContractsAndHours
>WHERE [DateOfRecord] >= Forms!ReportGen!txtStartDate
>AND [DateOfRecord] < DATEADD("d",1,Forms!ReportGen!txtStartDate)
>
>I can also post the SQL View if that will help. Thanks for any assistance.


Asuming you are using the correct form and text box names,
that should work without prompts as long as the form stays
open. What you are seeing sounds like the form is somehow
closing itself.

--
Marsh
MVP [MS Access]
From: SSi308 on
Marshall,

Thanks for the reply. I ended up deleting the query and recreating. Guessing
there was a typo somewhere in the query that I just wasn't seeing. The form
is working perfectly.

Lori

"Marshall Barton" wrote:

> SSi308 wrote:
>
> >I am trying to create a dialogue form which asks for start date and end date
> >and includes a button to run a report. My goal is to enter the dates only
> >once to run the report. Currently I have the date parameters set in the two
> >queries and have to enter the date range twice when running the report. I
> >tried following several answers to similar questions but now when opening the
> >form and entering the dates I am prompted to re-enter the dates 3 times!
> >
> >The report I am ultimately trying to run consists of a main report,
> >rptCallVolume, and a subreport, rptContractsAndHours.
> >Each of those reports are based on a parameter query:
> >rptCallVolume
> >Field: CallDate
> >Table: DailyCalls
> >WHERE [CallDate] >= Forms!ReportGen!txtStartDate
> >AND [CallDate] < DATEADD("d",1,Forms!ReportGen!txtStartDate)
> >
> >rptContractsAndHours
> >Field: DateOfRecord
> >Table: ContractsAndHours
> >WHERE [DateOfRecord] >= Forms!ReportGen!txtStartDate
> >AND [DateOfRecord] < DATEADD("d",1,Forms!ReportGen!txtStartDate)
> >
> >I can also post the SQL View if that will help. Thanks for any assistance.
>
>
> Asuming you are using the correct form and text box names,
> that should work without prompts as long as the form stays
> open. What you are seeing sounds like the form is somehow
> closing itself.
>
> --
> Marsh
> MVP [MS Access]
> .
>