Connecting Tech Pros Worldwide Forums | Help | Site Map

Repetitively asked for parameter value

Newbie
 
Join Date: Feb 2007
Posts: 1
#1: Feb 16 '07
Dear all,

I have created a main report (for monthly purchase summary) and a sub report (for monthly sales summary).

I have linked main report with a parameter query (i.e. purchasesummary1) and I have linked the sub report with another parameter query (i.e salessummary2)

when i open main report and sub report separately, they asked me the parameter value once only but when I unite them in a single report (i.e. main report + sub report) it behaves as follow;

- it asks the parameter value for the main report once only but
- it asks the parameter value for the sub report twice and if the sub report is slipped to the next page, it again ask me the parameter value for sub report to allow me to go to the next page.

please advise me the solution.

Actually i want to prepare a single report by the name (Monthly Summary Statement) which comprises of a main report (name Monthly Purchase Summary) and a sub report (name Monthly Sales Summary). And when i open it, it only once ask me the following parameter values;

[Enter the month for the monthly summary statement] and I type "JANUARY" etc.

[Enter the year for the monthly summary statement] and I type "2007" etc.

Look forward to receive your reply
thanks
Stephen

NeoPa's Avatar
Administrator
 
Join Date: Oct 2006
Location: London - UK
Posts: 15,747
#2: Feb 17 '07

re: Repetitively asked for parameter value


Stephen, consider trying a slightly different approach.
  1. Create an unbound Form with TextBoxes for entering your two required bits of information.
  2. Create queries for the two reports (Main & Sub) which are not restricted at all (This will be handled differently later).
  3. Link the two Reports on the relevant field between the two queries.
  4. In the Form, create a Filter string in VBA.
  5. Invoke the Main Report from your Form using the Filter string as a parameter.
    Expand|Select|Wrap|Line Numbers
    1. Call DoCmd.OpenReport("ReportName",acViewPreview,,strFilter)
Reply