Problem selecting records in a query

S

Steve

Hi,

I'm running a query in Access 2003 to select all records that have one of
two values: "Pre-Games" or "Pre and Post Games" in two different fields in a
table. The fields are called Other Roles and Other Roles 2 and exist right
next to each other in the table. The problem I'm having is when I use Like
"Pr*" or list the entire constant in just the Other Roles field I get the
correct results; however, when I specify the same exact criteria in the
Other Role 2 field, I get blank results. I have tried using Or to test both
fields, Like in one field and testing for constants in the second and have
even moved the fields in my query so they're separated - but I always get
the same results. Test in one field, ok - test in both fields - get nothing.
Any suggestions? I'm at a loss to explain why this is happening. It's a very
simple test and either I'm missing something very simple or there's a bug
that I need a workaround for.

I'm no Access expert by any stretch of the imagination - just trying to help
a volunteer group stage a lare sporting event. I need the two fields because
they may volunteer for either pre or post game support and I needed to glean
this information later for reports - this is what I'm trying to do now.

HELP!

Thx!
 
K

KARL DEWEY

In design view grid put the criteria for the second field on the second
criteria row.
This sets an OR situation.
 
S

Steve

Karl,

I just want to make sure I understand what you're saying:

In Field 1, Other Role, the criteria is Like "Pre*" are you saying I should
make the criteria for the second field, Other Role 2, Like "Pre*" but put it
in the second criteria row? I've used the OR but I thought it was for one
field only. Does using it like you suggested in essence make a SQL stmt that
reads IF FIELD 1 LIKE "PRE*" OR FIELD 2 LIKE "PRE*"?

Hope that makes sense - THANKS!!!

Steve

Should I make Other Role 2
 

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