Weird column prefixes in filtering expressions

Y

Yarik

Hello,

In an Access 2003 ADP application, I have a bound continuous form.
Filtering is enabled.

Usually, when user invokes "Filter by Selection", the corresponding
filter strings (Me.Filter) contain simple expressions like

((Manufacturer_Name="Cisco"))

In particular, those expressions usually refer to the underlying
recordset's columns directly, without using prefixes/qualifiers of any
kind. So far so good...

I've noticed, though, that in some circumstances, the names of columns
in the filter expressions get prepended by the form's name. For
example, like this:

((fProductProperties.Manufacturer_Name="Cisco"))

where 'fProductProperties' is the name of the form to which the filter
is app.

The problem is: I can't find any clues on when and why do such
prefixes appear. What exactly may be causing MS Access to use the
form's name as qualifiers of column names in filtering expression? It
looks really bizzarre.

Please help!

Thank you,
Yarik.
 
A

Allen Browne

This issue did not occur in Access 2000 or earlier: you could not filter a
form using the display value in a combo, only the actual bound value (which
can be hidden of course.)

In Access 2002, MS decided they needed to get the filtering working, so the
user can filter on the display value, even if it is not the value of the
bound column. So, the prefixes started to occur on those tables where the
lookup table itself was needed to match on the display value. It's rather
flakey (i.e. there are some unfixed bugs in Access in this area), but if you
know the name of the lookup table, it's usually fairly consistent.

FWIW, this web page:
http://allenbrowne.com/AppFindAsUTypeCode.html
contains some functions that try to pin down what is the first visible
column of a combo:
FirstVisibleColumn()
what is the mostly likely filter name Access will use for this field:
GetFilterField()
and what name the user knows the control by:
Caption4Control()
 

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