Hi all,
I'm having problems with this sql statement.
Could you please look at it and advise on any problems.
sdate & edate = dd/mm/yyyy format which is the same format as the data in the access database.
SQL statement is:
Any help is most apprechiated. I'm expecting it to be something silly that I just keep missing.
I know that data exists to be found and all I get is a blanks results table. No error message.
Cheers,
Barry
ICT Network Administrator
IT Services Manager
I'm having problems with this sql statement.
Could you please look at it and advise on any problems.
sdate & edate = dd/mm/yyyy format which is the same format as the data in the access database.
SQL statement is:
Code:
strSql1 = "SELECT * FROM (([Service Records] LEFT JOIN JobTypeTable ON [Service Records].[Call Type] = JobTypeTable.samsID) LEFT JOIN Customers ON [Service Records].[Customer ID] = Customers.[Customer ID]) LEFT JOIN [Status Codes] ON [Service Records].[Status] = [Status Codes].[Status] WHERE [Service Records].[Call Type] = 1 AND Outstanding = True AND ([Service Records].[Date Call Placed] < " & sdate & " AND [Service Records].[Date Call Placed] > " & edate & ") OR [Service Records].[Call Type] = 7 AND Outstanding = True AND ([Service Records].[Date Call Placed] < " & sdate & " AND [Service Records].[Date Call Placed] > " & edate & ") OR [Service Records].[Call Type] = 2 AND Outstanding = True AND ([Service Records].[Date Call Placed] < " & sdate & " AND [Service Records].[Date Call Placed] > " & edate & ") OR [Service Records].[Call Type] = 6 AND Outstanding = True AND ([Service Records].[Date Call Placed] < " & sdate & " AND [Service Records].[Date Call Placed] > " & edate & ") ORDER BY [Date Call Placed];"
set rs1 = conn.Execute(strSql1)
I know that data exists to be found and all I get is a blanks results table. No error message.
Cheers,
Barry
ICT Network Administrator
IT Services Manager