Findfirst w/ date field

CasperS

New member
Local time
Today, 21:11
Joined
May 13, 2002
Messages
8
I am trying to match several fields from one table to another table with findfirst. I can see that the data is correct, but a match is not found. I think this is because the last of the 3 concantenated fields is a date field. Is it possible to use findfirst w/ a date criteria to find a match to a date field in a table? Any help would be greatly appreciated.
 
in your concatenated string, are you surrounding your date value in # delimiters? like this... #1/1/04# ...?
 
Thanks for the reply ScottN,

Here are the statements:

sSQL2 = "DEPARTMENT = " & Chr$(34) & rstTemp!Department & Chr$(34) & " And PARTNUMBER = " & Chr$(34) & rstTemp!PartNumber & Chr$(34) & " And ShipDate = " & Chr$(34) & rstTemp!shipdate & Chr$(34)

rstArchive.FindFirst sSQL2

I have placed the # before and after the shipdate field, but I get a compile error.
 
Casper,

Code:
sSQL2 = "DEPARTMENT = " & Chr$(34) & rstTemp!Department & Chr$(34) & " And " & _
        "PARTNUMBER = " & Chr$(34) & rstTemp!PartNumber & Chr$(34) & " And " & _
        "ShipDate = #" & rstTemp!shipdate & "#;"

Wayne
 
Wayne,

That's perfect! Thank you very much.

This is a great site for access support and you are one of the reason's why.
 

Users who are viewing this thread

Back
Top Bottom