I have boxes labeled FromDate and ToDate and inside the boxes are files that fall between the dates. I now want to be able to do on a date and it will show which box to go to.
I have been able to achieve this in Access by doing this
SELECT Heritage.ID, Heritage.barcode, Heritage.FromDate, Heritage.ToDate, Heritage.location, Heritage.type
FROM Heritage
WHERE ((([enterdate])>=[heritage.fromdate] And ([enterdate])<[heritage.todate]));
I have come to replicate it in ASP and have done this
set objRS = con.execute ("SELECT heritage.ID, heritage.Barcode, heritage.FromDate, heritage.ToDate, heritage.location, heritage.type FROM Heritage WHERE Heritage.FromDate >= #"& request("showdates") &"# and Heritage.ToDate < #"& request("showdates") &"# ORDER BY heritage.type ASC;")
But it doesn't show anything. If you take out either of the 2 > or < then it will return results as expected.
Any help on this would be much apprieciated.
Thanks
I have been able to achieve this in Access by doing this
SELECT Heritage.ID, Heritage.barcode, Heritage.FromDate, Heritage.ToDate, Heritage.location, Heritage.type
FROM Heritage
WHERE ((([enterdate])>=[heritage.fromdate] And ([enterdate])<[heritage.todate]));
I have come to replicate it in ASP and have done this
set objRS = con.execute ("SELECT heritage.ID, heritage.Barcode, heritage.FromDate, heritage.ToDate, heritage.location, heritage.type FROM Heritage WHERE Heritage.FromDate >= #"& request("showdates") &"# and Heritage.ToDate < #"& request("showdates") &"# ORDER BY heritage.type ASC;")
But it doesn't show anything. If you take out either of the 2 > or < then it will return results as expected.
Any help on this would be much apprieciated.
Thanks