Can a Query Accept value from a string.

businessman

Registered User.
Local time
Today, 14:04
Joined
Jun 19, 2006
Messages
79
Can i create a query that will have a string in the Criteria box, where that string is assigned a value in VB code?

for instance:
Code:
Dim xyz As String

xyz = "TV"

and I put in the Criteria Box WHERE xyz = "Pizza"
 
For what purpose



If you need to do a string search, cant you use a form with a text box and use a string search for the criteria using -

Like "*" & [Forms].[Form1].[Text0] & "*"
 
i have 3 checkboxes A, B, and C. If A is checked i want the Query to search for A in a field. if A and B are checked i want it to search for A and B. Therefore in the query could i have 3 columns for that field and say where strA OR strB OR strC. so in my code if A and B are checked then strA = "A", strB="B", and strC="B". now only A and B are searched for.
 
Can you zip your db and I will have a look?
 

Users who are viewing this thread

Back
Top Bottom