Displaying filter property - Access 2003

  • Thread starter Thread starter dt
  • Start date Start date
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
 
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)
 
I had already tried [form].[filter] - still get the #name? error

Allen Browne said:
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)

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

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

dt said:
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
 
Works fine here.

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

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

dt said:
I had already tried [form].[filter] - still get the #name? error

"Allen Browne" <[email protected]> wrote in message
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)
 
Great.... Now what do I do? I'm mandated to go to Office 2003 this week!

Diann

Allen Browne said:
Works fine here.

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

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

dt said:
I had already tried [form].[filter] - still get the #name? error

"Allen Browne" <[email protected]> wrote in message
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)
 
Hi Diann

This is not version dependent.
Have tested it, and can assure you it works fine in A2003 also.
 
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
 
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.
 
Back
Top