Re: OpenReport Method

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



That's not what I mean. Let's say I run a report like so:

DoCmd.OpenReport "report_name", acPreview,,"wherecondition"

When the report is running the OnOpen event, I want to see what the value of
that wherecondition was. How do I do that? I tried doing Me.Filter and
Me.ServerFilter, but these give me an empty string.

TIA,
Eric

"Marshall Barton" wrote:

> Eric D. wrote:
> >Is there a way to access the wherecondition parameter from the OpenReport
> >method?
>
>
> Now that is a confusing question. ;-)
> You specify the WhereCondition argument on the OpenReport
> method.
>
> Maybe you meant the report's Open event procedure?? If so,
> the Report's Filter property is supposed to contain the
> argument string.
>
> --
> Marsh
> MVP [MS Access]
>
.



Relevant Pages

  • Re: Query criteria that isnt bound to a single form or report
    ... Megan, to make it flexible, leave the criteria out of the query. ... use the WhereCondition of OpenReport. ... Each form can then build its own critiera, and re-use the same report. ...
    (comp.databases.ms-access)
  • Re: How to get around "filter too long" run-time error?
    ... Instead of using the wherecondition argument, ... the OpenReport method to pass the name of a saved query. ... you to filter a report without limitation on the size of the WHERE clause. ... How do I save a query from the form with the selected list items? ...
    (microsoft.public.access.formscoding)
  • Re: Report Form Design
    ... The most flexible approach is to use OpenReport with a WhereCondition built ... Although the example is actually building the Filter for a form, ... subreport's query refer to the controls on the report form, ...
    (microsoft.public.access.tablesdbdesign)
  • Re: report to open to a specified id number
    ... the form by using the WhereCondition of OpenReport. ... rather than allenbrowne at mvps dot org. ... >I have a report that I want to display all my radio traffic. ...
    (microsoft.public.access.reports)
  • Re: Complex query coding Question
    ... You now OpenReport with something like this in the WhereCondition string: ... Obviously you have to concatenate the relvant values into the string depending which boxes are checked, and change the 3 to however many were checked. ... SELECT DISTINCT ProjectID, Item ... When I check Items on the form and hit report, ...
    (microsoft.public.access.queries)