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!

Access where clause

Status
Not open for further replies.

ck1999

Technical User
Dec 2, 2004
784
US
I am trying to make a where clause if frame3.value = 5 then salesrepini will NOT be in the list. I have tried "not in" and "<> in".

Dim stDocName As String
Select Case Frame3.Value ' Evaluate Number.
Case 1
criteria = "salesrepini = 'JAP'"
Case 2
criteria = "salesrepini = 'SS'"
Case 3
criteria = "salesrepini = 'RS'"
Case 4
criteria = "salesrepini = 'GDB'"
Case 5
criteria = "salesrepini in('JAP','SS','RS','GDB')"
Case Else ' Other values.
criteria = ""
End Select

stDocName = "rpteqrcompletelisting"
DoCmd.OpenReport stDocName, acPreview, , criteria


thank you

ck1999
 
Perhaps this ?
criteria = "Not (salesrepini In('JAP','SS','RS','GDB'))"

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top