Displaying filter property - Access 2003

D

dt

I'm currently upgrading my databases from Access 2000 to Access
2003... so far, it's been smooth going. But, I have one problem I
haven't been able to solve yet:

I have a form which is used as a "Filter by Form". One of the fields
displays the filter in use - This way the user knows what he selected
(and why perhaps he didn't get any records). Helps me too, when they
say "It doesn't work!" (they usually limited the filter too
stringently and came up with 0 records).

To do this is Access 97, and Access 2000, I just set the control
source of the field to be

=filter

and the Yippee, the current filter was displayed!! Now, going to
Access 2003, I get a #Name? for the field! I can't figure out how to
refer to this property so it will show up on the form...

grrr - with one exception (report subtotals from Access to Excel),
Access 2000 was working fine for me... I hate upgrading!

Diann
 
A

Allen Browne

The Filter is a property of the form, so try exactly this:
=[Form].[Filter]

You may want to show that only if the form is on, so it may be better to
use:
=IIf([Form].[FilterOn], [Form].[Filter], Null)
 
D

dt

I never got any advice for this - and no matter what I did, I could
not get it to work in Access 2003. I did, however, figure a
work-around. Instead of the datasource for the field set as
=[form].[filter], in the Apply Filter event, I forced the filter
property into the field. This worked. Don't know why it didn't work
the other way, and can't seem to figure it out. At least the form
looks right now...

Diann

You keep saying this, but it is not working for Access 2003 [in my
case], although it is working fine in 2000! There must be something
I'm missing, perhaps in references... that seems to be the culprit
when things which are supposed to work don't! I don't know what, if
anything, I'm missing - but obviously, I'm missing something! It's
supposed to work, all I get is ?Name# for this field whenever I use
Access 2003. I tried converting the database to 2003 (rather than
letting 2003 use the 2000 format database) - and get the same
results.

When I use Access 2000, the filter property shows up just dandy. What
am I missing here?

Diann
Allen Browne said:
Hi Diann

This is not version dependent.
Have tested it, and can assure you it works fine in A2003 also.
 

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