Wildcards in Lookup tables

G

Guest

I'm trying to set up a lookup table as follows:

Category Color
A Red
B Blue
* Green (anything not A or B is green)

The query won't recognize the * as a wildcard for some reason, it returns no
data for anything other than A or B. What am I doing wrong?
 
D

David Seeto via AccessMonster.com

When you set up a lookup table, I'm pretty sure that all of the values you
want to look up have to be listed in there.

If you want everything not defined in the table to get a particular value,
you can do it, but you'd need to use an outer join with one side equal to
"null" - if you post the tables & fields you're trying to use this in, I
could be more specific...
 
J

John Vinson

I'm trying to set up a lookup table as follows:

Category Color
A Red
B Blue
* Green (anything not A or B is green)

The query won't recognize the * as a wildcard for some reason, it returns no
data for anything other than A or B. What am I doing wrong?

Assuming that a "lookup table" recognizes wildcards.

* means "match anything" only in a Query using the LIKE operator. If
you JOIN this table to another table, the * in this table will match a
literal asterisk in the other table, and nothing else.

John W. Vinson[MVP]
 

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