T
T Best
I ran a query in Access 97 and got the correct # of records. When I run the
same query in my VBA code it seems to ignore the 2nd and 3rd conditions in
my
WHERE statement. I copied and pasted the SQL from Access and it still didn't
work. Any ideas? Here is my code(I have the SQL code on one line, no line
continuations):
Dim dbs As Database
Dim rst As Recordset
Dim strSQL As String
strSQL = "SELECT [1#_CLM#] FROM RCACMB WHERE ([1#_CLM#] Like 'SN*' Or
[1#_CLM#] Like 'NS*') AND ([5#_D-REPTD] >= #05/1/2005# And [5#_D-REPTD]
<=#05/31/2005# AND([9#_SECT])=2)"
Set rst = dbs.OpenRecordset(strSQL)
TIA
Ted
same query in my VBA code it seems to ignore the 2nd and 3rd conditions in
my
WHERE statement. I copied and pasted the SQL from Access and it still didn't
work. Any ideas? Here is my code(I have the SQL code on one line, no line
continuations):
Dim dbs As Database
Dim rst As Recordset
Dim strSQL As String
strSQL = "SELECT [1#_CLM#] FROM RCACMB WHERE ([1#_CLM#] Like 'SN*' Or
[1#_CLM#] Like 'NS*') AND ([5#_D-REPTD] >= #05/1/2005# And [5#_D-REPTD]
<=#05/31/2005# AND([9#_SECT])=2)"
Set rst = dbs.OpenRecordset(strSQL)
TIA
Ted