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  

programming report parameter



 
 
Thread Tools Display Modes
  #1  
Old July 20th, 2004, 09:30 AM
wba
external usenet poster
 
Posts: n/a
Default programming report parameter

Hi all,

I have a report based on a parameter query, asking for
three parameters. The first two are dBeginDate and
dEndDate and the third one is strString. The report is
to be called six times, with a different value for
strString, the dates remaining the same.

The parameter query works fine, and so does the report.

I want to call the report from within a program, so that
I do not have to retype the parameters, but how do I get
the parameters in the docmd.open report ?

Thanks for your help,

W
  #2  
Old July 20th, 2004, 10:51 AM
Newbie
external usenet poster
 
Posts: n/a
Default programming report parameter

Are the parameters being stored on a form?
If yes, add a text box control to the report and reference the control on
the form
hth
"wba" wrote in message
...
Hi all,

I have a report based on a parameter query, asking for
three parameters. The first two are dBeginDate and
dEndDate and the third one is strString. The report is
to be called six times, with a different value for
strString, the dates remaining the same.

The parameter query works fine, and so does the report.

I want to call the report from within a program, so that
I do not have to retype the parameters, but how do I get
the parameters in the docmd.open report ?

Thanks for your help,

W



  #3  
Old July 20th, 2004, 10:31 PM
Marshall Barton
external usenet poster
 
Posts: n/a
Default programming report parameter

wba wrote:
I have a report based on a parameter query, asking for
three parameters. The first two are dBeginDate and
dEndDate and the third one is strString. The report is
to be called six times, with a different value for
strString, the dates remaining the same.

The parameter query works fine, and so does the report.

I want to call the report from within a program, so that
I do not have to retype the parameters, but how do I get
the parameters in the docmd.open report ?



The standard approach to this kind of thing is to use a form
with text boxes for the parameter values and a button to
initiate printing the report.

The query parameters would then be like:
Forms!theformname.textboxname

You may have some difficulty executing OpenReport multiple
times on the same report as well as making sure that the
parameter text boxes do not change until the report is
finished using them. If you are printing the report, then
check SysCmd in Help to tell you if the report is still open
before opening it again. If you're previewing the report,
you should expect to wait for the user to close one preview
before you open another.

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Display Parameter from Form on Report sara Setting Up & Running Reports 10 July 19th, 2004 04:54 PM
Report Based Upon Parameter Query with Form References Vincent DeLuca Setting Up & Running Reports 4 July 19th, 2004 01:55 AM
6 Tables, 1 Report, W/O 6 Qrys Andy Setting Up & Running Reports 9 June 29th, 2004 09:52 PM
Label SRIT General Discussion 2 June 22nd, 2004 09:42 PM
Access 2003 report parameter problem Peter Kaufman Setting Up & Running Reports 0 June 10th, 2004 01:47 PM


All times are GMT +1. The time now is 08:34 PM.


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