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  

Parameters in subreports



 
 
Thread Tools Display Modes
  #1  
Old June 24th, 2004, 04:52 PM
Vince
external usenet poster
 
Posts: n/a
Default Parameters in subreports

I have a report with 3 subreports. Each subreport uses
the same parameter. How can I pass the input parameter
from one subreport to the next, so the user will not have
to input the parameter 3 times?

Thanks.
  #2  
Old June 24th, 2004, 05:25 PM
Allen Browne
external usenet poster
 
Posts: n/a
Default Parameters in subreports

Simplest solution is to get the queries to read the value from a form.

Create a form with a text box, where the user can enter the value. In the
Criteria row of each query under the appropriate field, enter:
[Forms]![MyForm]![MyTextBox]

It is a good idea to declare these parameters in the query, so it
understands the data type. For example, if this is a date, in query design
view choose Parameters on the Query menu, and enter:
[Forms]![MyForm]![MyTextBox] Date/Time
It also helps to set the Format property of the text box to Short Date (or
General Number or whatever).

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Vince" wrote in message
...
I have a report with 3 subreports. Each subreport uses
the same parameter. How can I pass the input parameter
from one subreport to the next, so the user will not have
to input the parameter 3 times?

Thanks.



  #3  
Old June 24th, 2004, 06:47 PM
Vince
external usenet poster
 
Posts: n/a
Default Parameters in subreports

Thanks, Allen. I'm trying to do that but running into
problems. I will keep trying, following your suggestions
and the Help page "Use a form to enter report criteria".

Does it matter that my main report is unbound?

And will this input date persevere until the entire report
(and subreports) is completed?


-----Original Message-----
Simplest solution is to get the queries to read the value

from a form.

Create a form with a text box, where the user can enter

the value. In the
Criteria row of each query under the appropriate field,

enter:
[Forms]![MyForm]![MyTextBox]

It is a good idea to declare these parameters in the

query, so it
understands the data type. For example, if this is a

date, in query design
view choose Parameters on the Query menu, and enter:
[Forms]![MyForm]![MyTextBox] Date/Time
It also helps to set the Format property of the text box

to Short Date (or
General Number or whatever).

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Vince" wrote in

message
...
I have a report with 3 subreports. Each subreport uses
the same parameter. How can I pass the input parameter
from one subreport to the next, so the user will not

have
to input the parameter 3 times?

Thanks.



.

  #4  
Old June 25th, 2004, 01:34 AM
Vince
external usenet poster
 
Posts: n/a
Default Parameters in subreports

Thanks again! It is now working, and I can proceed with
the project.
-----Original Message-----
Simplest solution is to get the queries to read the value

from a form.

Create a form with a text box, where the user can enter

the value. In the
Criteria row of each query under the appropriate field,

enter:
[Forms]![MyForm]![MyTextBox]

It is a good idea to declare these parameters in the

query, so it
understands the data type. For example, if this is a

date, in query design
view choose Parameters on the Query menu, and enter:
[Forms]![MyForm]![MyTextBox] Date/Time
It also helps to set the Format property of the text box

to Short Date (or
General Number or whatever).

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Vince" wrote in

message
...
I have a report with 3 subreports. Each subreport uses
the same parameter. How can I pass the input parameter
from one subreport to the next, so the user will not

have
to input the parameter 3 times?

Thanks.



.

  #5  
Old July 9th, 2004, 03:01 PM
Savvoulidis Iordanis
external usenet poster
 
Posts: n/a
Default Parameters in subreports

Yes, but what happens when the same report can be opened from two different
forms ?



  #6  
Old July 9th, 2004, 06:45 PM
Duane Hookom
external usenet poster
 
Posts: n/a
Default Parameters in subreports

You open the form invisible and place values into the controls that are
required.

--
Duane Hookom
MS Access MVP


"Savvoulidis Iordanis" wrote in message
...
Yes, but what happens when the same report can be opened from two

different
forms ?





 




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
How can I subquery using different parameters? psPaul Running & Setting Up Queries 1 June 19th, 2004 02:05 AM
Too few parameters... BobRoyAce Running & Setting Up Queries 1 June 7th, 2004 02:14 PM
Error passing parameters Brian New Users 3 May 11th, 2004 11:09 PM
Functions parameters separator Jean Luc Worksheet Functions 2 March 4th, 2004 12:45 PM


All times are GMT +1. The time now is 05: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.