I’m trying to prevent duplicates being created in a table when I import outlook messages.
My logic is to compare the send and time the message was sent to determine if I already have the record.
strSQL = "SELECT * FROM tblOutlookMessage WHERE Message_From = """ & msg.SenderName & """ AND Message_Sent = #" & msg.SentOn & "#"
Comparing the two dates fails to find the match and the resulting recordset is always empty.
I’ve tried formatting the Date to US format before I use it in the Select statement
Format(msg.SentOn, "mm/dd/yyyy h:mm")
Then only dates up until the 12th of each month get duplicated.
Any tips or clues?