T
ThomasAJ
The date is used in a query definition in the "Where..." part.
The code is:
WHERE (((GuestStay.GuestID)=" & lngGuestID & ") AND ((DateDiff(""d"",#" &
dteCancelledDate & "#,[GuestStay.StayCreated])) Between 0 And " & intDays &
"))
I copied the ENTIRE Function that the above code is part of (and the calling
routine that supplies the date used by 'dteCancelledDate') from one machine
to another. The data is the same as well on both machines.
On one machine the records are found but on another they are not.
The date settings on both PCs are identical (in Regional and Language
Options). I looked at Access options but could not see any difference.
The ONLY way that it would work on the 'bad' PC was to make a date via
concatination to replace 'dteCancelledDate' using DATEPART. I put together
m/d/yyyy in place of 'dteCancelledDate'. (ie DatePart("d",dteCancelledDate)
etc
The code is:
WHERE (((GuestStay.GuestID)=" & lngGuestID & ") AND ((DateDiff(""d"",#" &
dteCancelledDate & "#,[GuestStay.StayCreated])) Between 0 And " & intDays &
"))
I copied the ENTIRE Function that the above code is part of (and the calling
routine that supplies the date used by 'dteCancelledDate') from one machine
to another. The data is the same as well on both machines.
On one machine the records are found but on another they are not.
The date settings on both PCs are identical (in Regional and Language
Options). I looked at Access options but could not see any difference.
The ONLY way that it would work on the 'bad' PC was to make a date via
concatination to replace 'dteCancelledDate' using DATEPART. I put together
m/d/yyyy in place of 'dteCancelledDate'. (ie DatePart("d",dteCancelledDate)
etc