OpenReport Method. How does FilterName work?

M

Mauricio Silva

I have been trying to understand the OpenReport method for quite awhile now
and I am still not able to undersstand how the argument FILTERNAME works.
Could anybody explain it to me in a quick way ?

DoCmd.OpenReport reportname[, view][, filtername][, wherecondition]

Thanks

Mauricio Silva
 
A

Allen Browne

Hi Maruicio.

Just ignore it, and use the WhereConditon instead.
No one that I know uses the FilterName argument, other than those still in
version 2. (I don't even think it works now.)

If you have a form open, and choose:
Records | Filter | Advanced Filter/Sort
you can create a "query" to filter your form.
When you apply the query, the WHERE clause gets applied to your form.

In Access 2, you could name the same query in OpenReport, and the WHERE
clause from the filter would be applied to the report. I think this
functionality seems to have broken in the switch to the 32-bit versions.
 
M

Mauricio Silva

Thanks Allen,

after a quick test, I can see there is not use for it anymore....

Mauricio Silva

Allen Browne said:
Hi Maruicio.

Just ignore it, and use the WhereConditon instead.
No one that I know uses the FilterName argument, other than those still in
version 2. (I don't even think it works now.)

If you have a form open, and choose:
Records | Filter | Advanced Filter/Sort
you can create a "query" to filter your form.
When you apply the query, the WHERE clause gets applied to your form.

In Access 2, you could name the same query in OpenReport, and the WHERE
clause from the filter would be applied to the report. I think this
functionality seems to have broken in the switch to the 32-bit versions.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Mauricio Silva said:
I have been trying to understand the OpenReport method for quite awhile
now
and I am still not able to undersstand how the argument FILTERNAME works.
Could anybody explain it to me in a quick way ?

DoCmd.OpenReport reportname[, view][, filtername][, wherecondition]

Thanks

Mauricio Silva
 
Top