filter a query

G

gibsol

I have a large database, in which are listed "period", "Model","MPC" and
"Country". What I am attempting to do is filter the query by one or all of
the listings shown. however if I use the filter for period and model e.g.
period 02 model 120 it returns no data, if I only ask for period 02 it will
give me all data pertaining to "02", if I ask for model "120" it will return
all data for model "120", but not if I combine the two. The criteria I have
entered is as shown.
[Select Model] Or Like "*", [Select Period] Or Like "*"
 
J

John W. Vinson/MVP

I have a large database, in which are listed "period", "Model","MPC" and
"Country". What I am attempting to do is filter the query by one or all of
the listings shown. however if I use the filter for period and model e.g.
period 02 model 120 it returns no data, if I only ask for period 02 it will
give me all data pertaining to "02", if I ask for model "120" it will return
all data for model "120", but not if I combine the two. The criteria I have
entered is as shown.
[Select Model] Or Like "*", [Select Period] Or Like "*"

Try

[Select Model] OR [Select Model] IS NULL

and similarly for the other fields.
 
G

gibsol

Brilliant, thanks for putting me out of my agony, it is sooo easy when you
know how.

John W. Vinson/MVP said:
I have a large database, in which are listed "period", "Model","MPC" and
"Country". What I am attempting to do is filter the query by one or all of
the listings shown. however if I use the filter for period and model e.g.
period 02 model 120 it returns no data, if I only ask for period 02 it will
give me all data pertaining to "02", if I ask for model "120" it will return
all data for model "120", but not if I combine the two. The criteria I have
entered is as shown.
[Select Model] Or Like "*", [Select Period] Or Like "*"

Try

[Select Model] OR [Select Model] IS NULL

and similarly for the other fields.
 

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