Select Specific Report

  • Thread starter Thread starter Bill
  • Start date Start date
B

Bill

Hi,

I'm setting three queries that have pop-up "Enter Parameter Value". I
don't understand and not sure if it's right when I create Command Button
"Preview" that has few "DoCmd.OpenReport... "Report Name" but it kept pop-up
by three times. Each query has their own report. I don't want to see pop
up three times when I select one report and related to the query so I can
get one POP-UP than three times...

I need you help if there is another way to do this.

YOur help would be much appreciated.

Thanks,
 
Bill said:
I'm setting three queries that have pop-up "Enter Parameter Value". I
don't understand and not sure if it's right when I create Command Button
"Preview" that has few "DoCmd.OpenReport... "Report Name" but it kept pop-up
by three times. Each query has their own report. I don't want to see pop
up three times when I select one report and related to the query so I can
get one POP-UP than three times...


Instead of using a pop-up prompt for the query paramter, use
a text box on the form where the users can enter the
parameter value. Then the queries can use a parameter of
the form:
Forms!yourform.the textbox.

If you're using the query parameter to filter the data for
the reports, you can get rid of the parameter in query and
use the OpenReport method's WhereCondition argument:

DoCms.OpenReport "reportname", acViewPreview, , _
"numericfield = " & numbervariable
or

DoCms.OpenReport "reportname", acViewPreview, , _
"textfield = """ & stringvariable & """"
 
Hi Bill,

I haven't heard back from you yet and I'm just writing in to see if you
have had an opportunity to try Marshall Barton's suggestion.

If you have any difficulties or concerns, please feel free to post here. I
look forward to hearing from you.


Thank you for your patience and cooperation.

Sincerely yours,

Mingqing Cheng
Microsoft Online Support
 
Back
Top