Like [field?] - more than 1 item

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I use the like function under my criteria in some queries to be prompted when
I run the query, like day of the week. When I try to put 2 days in I get no
results - I've tried seperating them by , or ;. I can enter "Tue" and bring
up all Tuesday's events or "Wed" and bring up all Wednesday's events. But if
I want "Tue" and "Wed" it does not work. Any Ideas.

Thanks.
 
You need to use two lines and OR the criteria.

In SQL that would look like

SELECT ...
FROM YourTable
WHERE SomeField Like "Wed" or SomeField Like "Tue"
 
I don't think I explained very well. Under the "Day" field, I have also put
[Enter the day you want to see]. If I enter a single day - it works. If I
try to put 2 days in the enter parameter value box I get no results.

Thanks.
 
You cannot use a normal parameter box from a query to do what you seek.
You'll need to use your own form to allow the user to enter the desired
choice(s) (could do it by checkboxes, option group, textboxes, etc.), and
then have your query read the values from the form (depending upon how you
set up the form), or have the form generate the query's SQL statement from
what you enter and then run the query that it generates.

Post back with more details....

--

Ken Snell
<MS ACCESS MVP>



Jaybird said:
I don't think I explained very well. Under the "Day" field, I have also
put
[Enter the day you want to see]. If I enter a single day - it works. If
I
try to put 2 days in the enter parameter value box I get no results.

Thanks.

Jaybird said:
I use the like function under my criteria in some queries to be prompted
when
I run the query, like day of the week. When I try to put 2 days in I get
no
results - I've tried seperating them by , or ;. I can enter "Tue" and
bring
up all Tuesday's events or "Wed" and bring up all Wednesday's events.
But if
I want "Tue" and "Wed" it does not work. Any Ideas.

Thanks.
 
Back
Top