Parameter Query - not working when on parameter not entered

G

Guest

I have a query with two tables: Table1, Table2
The fields in the query are :

Field Region Super Date
Table Table1 Table2 Table2
Criteria [Enter Region] Like [Enter Super] & * Between [Beginning date] and
[End Date]

The query works fine if I enter all three parameters. If I enter only the
Region and Date parameters it will only return records that have a value in
the Super field, if will not return the records if the super field is blank.

I would appreciate instruction on how to get this parameter query to work.

Thanks in advance for anyones help
 
G

Guest

Thank you for your quick response. Please let me give you a little more
info. When I entered the Or Is Null and I enter something in the Super
prompt, it returns all for that Super plus all the records that have nothing
in the Super field. What I am trying to accomplish is, when I enter
something in the Super parameter I only get records for that Super. When I
don't enter anything in the Super parameter, I will get records for all.
I apologize if I am confusing. Does this make any sense?
Thanks again,
--
JAD


KARL DEWEY said:
Try this --
Like [Enter Super] & "*" Or Is Null

JAD said:
I have a query with two tables: Table1, Table2
The fields in the query are :

Field Region Super Date
Table Table1 Table2 Table2
Criteria [Enter Region] Like [Enter Super] & * Between [Beginning date] and
[End Date]

The query works fine if I enter all three parameters. If I enter only the
Region and Date parameters it will only return records that have a value in
the Super field, if will not return the records if the super field is blank.

I would appreciate instruction on how to get this parameter query to work.

Thanks in advance for anyones help
 
M

Marshall Barton

JAD said:
I have a query with two tables: Table1, Table2
The fields in the query are :

Field Region Super Date
Table Table1 Table2 Table2
Criteria [Enter Region] Like [Enter Super] & * Between [Beginning date] and
[End Date]

The query works fine if I enter all three parameters. If I enter only the
Region and Date parameters it will only return records that have a value in
the Super field, if will not return the records if the super field is blank.


In the OR line below the criteria:
Like [Enter Super] & *
add:
Is Null
 
G

Guest

Thank you. This works great.
--
JAD


Marshall Barton said:
JAD said:
I have a query with two tables: Table1, Table2
The fields in the query are :

Field Region Super Date
Table Table1 Table2 Table2
Criteria [Enter Region] Like [Enter Super] & * Between [Beginning date] and
[End Date]

The query works fine if I enter all three parameters. If I enter only the
Region and Date parameters it will only return records that have a value in
the Super field, if will not return the records if the super field is blank.


In the OR line below the criteria:
Like [Enter Super] & *
add:
Is Null
 

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