A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Reference controls on a dialogue form as the parameters



 
 
Thread Tools Display Modes
  #1  
Old May 27th, 2010, 09:38 PM posted to microsoft.public.access.reports
SSi308
external usenet poster
 
Posts: 42
Default Reference controls on a dialogue form as the parameters

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.
Ads
  #2  
Old May 28th, 2010, 04:08 AM posted to microsoft.public.access.reports
Marshall Barton
external usenet poster
 
Posts: 5,361
Default Reference controls on a dialogue form as the parameters

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]
  #3  
Old June 1st, 2010, 03:29 PM posted to microsoft.public.access.reports
SSi308
external usenet poster
 
Posts: 42
Default Reference controls on a dialogue form as the parameters

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]
.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 11:20 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
Copyright 2004-2018 OfficeFrustration.
The comments are property of their posters.