D
Dave Flowers
Hi all,
I'm using an Access 2003 database (mdb) linked to SQL 2005 database tables.
Everything works fine until I want to query the database using dates.
Here is the sql string from my query:
SELECT dbo_tblDistrict.DistrictName, dbo_tblContact.Name,
dbo_tblSupportLog.TicketID, dbo_tblProducts.ProdDescription,
dbo_tblSupportLog.Date, dbo_tblSupportLog.Resolution,
dbo_tblSupportLog.Start, dbo_tblSupportLog.End, Format([End]-[Start],"Short
Time") AS Total
FROM dbo_tblProducts, (dbo_tblSupportLog INNER JOIN dbo_tblDistrict ON
dbo_tblSupportLog.DID = dbo_tblDistrict.DID) INNER JOIN dbo_tblContact ON
(dbo_tblDistrict.DID = dbo_tblContact.DID) AND (dbo_tblSupportLog.CID =
dbo_tblContact.CID)
WHERE (((dbo_tblSupportLog.Date) Between
[Forms]![frmMonthlyTimeReport]![dtpStart] And
[Forms]![frmMonthlyTimeReport]![dtpEnd]));
This works fine using the Access tables but now that they have been linked
to the SQL database I just get all the records. It doesn't filter anything
out based on date.
Dave
I'm using an Access 2003 database (mdb) linked to SQL 2005 database tables.
Everything works fine until I want to query the database using dates.
Here is the sql string from my query:
SELECT dbo_tblDistrict.DistrictName, dbo_tblContact.Name,
dbo_tblSupportLog.TicketID, dbo_tblProducts.ProdDescription,
dbo_tblSupportLog.Date, dbo_tblSupportLog.Resolution,
dbo_tblSupportLog.Start, dbo_tblSupportLog.End, Format([End]-[Start],"Short
Time") AS Total
FROM dbo_tblProducts, (dbo_tblSupportLog INNER JOIN dbo_tblDistrict ON
dbo_tblSupportLog.DID = dbo_tblDistrict.DID) INNER JOIN dbo_tblContact ON
(dbo_tblDistrict.DID = dbo_tblContact.DID) AND (dbo_tblSupportLog.CID =
dbo_tblContact.CID)
WHERE (((dbo_tblSupportLog.Date) Between
[Forms]![frmMonthlyTimeReport]![dtpStart] And
[Forms]![frmMonthlyTimeReport]![dtpEnd]));
This works fine using the Access tables but now that they have been linked
to the SQL database I just get all the records. It doesn't filter anything
out based on date.
Dave