Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Wilcard parameter in query

Status
Not open for further replies.

jimb0ne

Programmer
Oct 6, 2003
291
CA
Hi again folks,
Having trouble with a query I'm trying to open. I have 2 parameters in my query, date and treatment number. The problem is that i'm trying to say "any treatment number with a specific date" from code and cannot figure it out. I don't want to mess with my SQL string, what I'm doing right now is the following:

set qd = db.querydefs("queryname")
qd.parameters("[date]") = date
qd.parameters("[treatmentnum]") = "*"
set rs = qd.openrecordset

the problem is the * doesn't produce wildcard results, I need to figure out how i can enter a wildcard character for this value from code in this fashion.

Thanks in advance,
James
 
thanks, but this does not seem to work. I can't seem to get a wildcard value to work at all, I suppose I will just have to change the SQL string for the query to check for numbers > 0 and then change it back at the end to check for a specific parameter. I'm quite surprised you can't just enter a * value for a parameter in a query and have it return wildcard results....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top