C
Chuck
Please tell me what is wrong with my syntax.
Dim db As Database
Dim rstContactHx As ADODB.Recordset
Set db = CurrentDb()
Set rstContactHx = New ADODB.Recordset
rstContactHx.Open "SELECT tblStandOrder.VenID FROM
tblStandOrder WHERE [ExpDate] Between #" & dtBegin & "#
And #" & dtEnd & "# And [Cat] = ""CA" Or [Cat] = "Both""
And [Dept] = """ & strDept & """ And [Inactive] = No;",
CurrentProject.Connection
The problem area is:
And [Cat] = ""CA" Or [Cat] = "Both""
I want to filter the recordset by either "CA" or "Both".
Your assistance with this would be greatly appreciated.
Sincerely,
Chuck
Dim db As Database
Dim rstContactHx As ADODB.Recordset
Set db = CurrentDb()
Set rstContactHx = New ADODB.Recordset
rstContactHx.Open "SELECT tblStandOrder.VenID FROM
tblStandOrder WHERE [ExpDate] Between #" & dtBegin & "#
And #" & dtEnd & "# And [Cat] = ""CA" Or [Cat] = "Both""
And [Dept] = """ & strDept & """ And [Inactive] = No;",
CurrentProject.Connection
The problem area is:
And [Cat] = ""CA" Or [Cat] = "Both""
I want to filter the recordset by either "CA" or "Both".
Your assistance with this would be greatly appreciated.
Sincerely,
Chuck