query with multiple criteria prompts

T

TerryTomasini

When I run a query, I need to be prompted to enter 2 different strings.

The field is 'Status' and I need to have it return all data containing 2
different strings. For example, records where 'status' contains "Microsoft"
and "6".

Any suggestions?

Thanks
 
O

Ofer

Try this

WHERE Status In ([Param1],[Param2])
You can put as many parameters you would like.
 
T

TerryTomasini

Thanks, this helps when the params are complete words.

How can I return based upon strings? For example if a param is "al", return
alaska and albany.




--
Terry T.


Ofer said:
Try this

WHERE Status In ([Param1],[Param2])
You can put as many parameters you would like.


TerryTomasini said:
When I run a query, I need to be prompted to enter 2 different strings.

The field is 'Status' and I need to have it return all data containing 2
different strings. For example, records where 'status' contains "Microsoft"
and "6".

Any suggestions?

Thanks
 
O

Ofer

WHERE Status Like "*" & [Param1] & "*" AND Status Like "*" & [Param2] & "*"

*aaa* will bring all the words that conatain aaa
aaa* will bring all the words that start with aaa
*aaa will bring all the words that end with aaa
TerryTomasini said:
Thanks, this helps when the params are complete words.

How can I return based upon strings? For example if a param is "al", return
alaska and albany.




--
Terry T.


Ofer said:
Try this

WHERE Status In ([Param1],[Param2])
You can put as many parameters you would like.


TerryTomasini said:
When I run a query, I need to be prompted to enter 2 different strings.

The field is 'Status' and I need to have it return all data containing 2
different strings. For example, records where 'status' contains "Microsoft"
and "6".

Any suggestions?

Thanks
 
T

TerryTomasini

Thanks --

That did it
--
Terry T.


Ofer said:
WHERE Status Like "*" & [Param1] & "*" AND Status Like "*" & [Param2] & "*"

*aaa* will bring all the words that conatain aaa
aaa* will bring all the words that start with aaa
*aaa will bring all the words that end with aaa
TerryTomasini said:
Thanks, this helps when the params are complete words.

How can I return based upon strings? For example if a param is "al", return
alaska and albany.




--
Terry T.


Ofer said:
Try this

WHERE Status In ([Param1],[Param2])
You can put as many parameters you would like.


:

When I run a query, I need to be prompted to enter 2 different strings.

The field is 'Status' and I need to have it return all data containing 2
different strings. For example, records where 'status' contains "Microsoft"
and "6".

Any suggestions?

Thanks
 
Top