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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing all (" * ") to query via Code

Status
Not open for further replies.

claudebo

Programmer
May 17, 2002
8
US
Hi

I have a number of queries that are passed criteria via code

Query view:

|Field |CusLastName | etc.
|Table | CusTable |
|Criteria |Queryprop("Pass")|

Example Code:
"Function Queryprop(Prop) As String
Queryprop = Currentprop
End Function"

This works fine when the values are defined : "Smith"

The problem is when I want the query to pass all values
"*"
It does not recognize the *
How can I get it to show all CusLastNames as a passed value in function Queryprop.

Thanks
Claude


 
the reason is that in the query you have an = not a like...

look at using the term like

The way I deal with this is that I have an if then, and build my own sql statement... then open a recordset and do what I need there...

--James
junior1544@jmjpc.net
Life is change. To deny change is to deny life.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top