Timestamp criteria being ignored

E

EJO

A2K MDB with SQL Server 200 backend...


Ok, I have read many posts on how not to include time in a criteria
expression of a timestamp...


What if I NEED to include the time? When including the time, the
entire timestamp is being ignored. I used a message box to verify what
my criteria was, look through the records and am getting everything
without any regard to the timestamp criteria. As soon as I format the
date to ignore the time, i get only records on that date:


DoCmd.OpenForm "OLEdit", , , "[SR_ID] = " & intSR & " AND
[ListDate] = #" & dtListDate & "#", , , intListType


The open event of the OLEdit form sets the recordsource:


If IsNumeric(Me.OpenArgs) = True Then
strSql = "SELECT * FROM SRSrvcsEquip;"
Else
strSql = "SELECT * FROM SRSrvcsEquipDefaults;"
End if

Me.RecordSource = strSql



Thanks, from a most frustrated know-enough-to-be-dangerous
part-time-coder...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top