Adam McReynolds
Registered User.
- Local time
- Today, 07:23
- Joined
- Aug 6, 2012
- Messages
- 129
I am trying to use multiple criteria in the Where clause of OpenReport. What is the proper syntax?
I know I am using the quotes wrong. Can someone please help?
Here are 2 attempts at the same code. Which one is correct?:
Here is my complete code. How do I write this in correctly?:
Thanks for the help.
I know I am using the quotes wrong. Can someone please help?
Here are 2 attempts at the same code. Which one is correct?:
Code:
reworkWhere = "ReworkTech = " & Me.cmb_tech_daily And Not IsNull(ReworkTimeOut)
reworkWhere = "ReworkTech = " & Me.cmb_tech_daily And ReworkTimeOut = Not IsNull
Here is my complete code. How do I write this in correctly?:
Code:
Dim strWhere
Dim reworkWhere
Dim repairWhere
Dim qcWhere
reworkWhere = "ReworkTech = " & Me.cmb_tech_daily And Not IsNull(ReworkTimeOut)
repairWhere = "RepairTech = " & Me.cmb_tech_daily And Not IsNull(RepairTimeOut)
qcWhere = "QC_Tech = " & Me.cmb_tech_daily And Not IsNull(QC_TimeOut)
strWhere = "' & reworkWhere & " Or " & repairWhere & " Or " & qcWhere & '"
DoCmd.OpenReport "RPT_MODULE_REPAIRS", acViewReport, , strWhere
Thanks for the help.