
Hi everybody,
I'm trying to consolidate 3 pop up parameters in one form where the user will enter the values in text boxes.
I have a date parameter, a country parameter and an amount parameter where I enter any value I want.
My SQL for these parameters is:
- WHERE Product.Date = [Date:]
- WHERE Product.Country Like "*" & [Search by any Country: ] & "*"
- WHERE Product.Amount Between [Amount > X] And [Amount < Y]
I succeeded in coding the first parameter which is the date in VBA after creating the form with the appropriate text and check boxes.
The VBA code for the date parameter is:
sWHERE = sWHERE & " AND Product.Date = " & _
"#" & Format$(
txtDate, "mm/dd/yyyy") & "#"
and it returns all the records for the date I specify in
txtDate box in my form
Could anyone help me finishing the code for the two other parameters (country and amount) that my form would return whatever the user would type in the text boxes txtCountry and txtAmount
sWHERE = sWHERE & " AND Product.Country......
txtCountry...
sWHERE = sWHERE & " AND Product.Amount......
txtAmount...
Thanks for the help, I'm coding in Access 2000