Stephen Byrom
asked on
Multi Where clause
Hi,
I am trying to open a report based on a where clause depending on what the user selects in an optionframe on a form.
I have looked through here and google but I am getting more and more confused.
It works if I select an option with a single number behind it, but not with the two numbers. (the numbers are primary keys for the customers).
Any help is appreciated.
Thanks
I am trying to open a report based on a where clause depending on what the user selects in an optionframe on a form.
I have looked through here and google but I am getting more and more confused.
It works if I select an option with a single number behind it, but not with the two numbers. (the numbers are primary keys for the customers).
Any help is appreciated.
Thanks
Dim strWhere As String
Dim Cust As Integer
Select Case Me.frameProdGroup
Case 1
Cust = 300 Or 169
Case 2
Cust = 444 Or 329
Case 3
Cust = 238
Case 4
Cust = 220
Case 5
Cust = 235
Case 6
Cust = 180
End Select
strWhere = "[fkCustID] = " & Cust
DoCmd.OpenReport "rptStoxBase", acViewReport, , strWhere
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
glad I could help.
Happy New Year!
Happy New Year!
ASKER
Thanks for your time, you've saved me loads