CONDITION IN MACRO #2

P

pauld

This is an update to an earlier question I posed. I am using Access 2002. I'm
trying to use a Condition in a Macro to determine whether or not to SetValue.
It appears that the Condition will not allow me to use a "wildcard"
(asterisk). The Field I'm checking is filled with entries like CRUZ SA or
CRUZ SB or CRUZ SC. I simply want to set the Condition to look for
CRUZ*...meaning any entry that begins with CRUZ. The Condition I set up is
[CLASS]="CRUZ*". It doesn't work. But, when I set the Condition to
[CLASS]="CRUZ SA" it works. Access Help seems to say I can use wildcards in a
Macro. Anybody know why this isn't working ?
 
B

Bob Quintal

This is an update to an earlier question I posed. I am using
Access 2002. I'm trying to use a Condition in a Macro to determine
whether or not to SetValue. It appears that the Condition will not
allow me to use a "wildcard" (asterisk). The Field I'm checking is
filled with entries like CRUZ SA or CRUZ SB or CRUZ SC. I simply
want to set the Condition to look for CRUZ*...meaning any entry
that begins with CRUZ. The Condition I set up is [CLASS]="CRUZ*".
It doesn't work. But, when I set the Condition to [CLASS]="CRUZ
SA" it works. Access Help seems to say I can use wildcards in a
Macro. Anybody know why this isn't working ?

Using wildcards requires the like operator, not the = operator,
therefore you want the condition [CLASS] like "Cruz"
 

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