OpenReport Method. How does FilterName work?

G

Guest

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.
 
G

Guest

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
 
Joined
Aug 3, 2011
Messages
1
Reaction score
0
Dear Allen:
Is it possible do do with a code just pressing a button. This form is intended to be use for some people and to filter a form a apply the filter is a little hard.

Thanks in advance.
Rafael
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" <[email protected]> wrote in message
news:[email protected]...
>
> 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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top