I have saved the outlook inbox mails in an Access mdb,
now I want to move a certain email to another directory in outlook(no problem with this part),
but I want to compare either the EntryID or the ReceivedTime, between what's in the mdb Form with that of the inbox, then move the email (unless there is an easier way!).
the following give me type mismatch, so I know it is about the format:
strSearch2 = "[ReceivedTime] = '" & Format([ReceivedTime], "dd-mmm-yy h:nn:ss AMPM") & "'"
Set OlItemLocate = OlFolder.Items.Find(strSearch2)
strSearch4 = "[ReceivedTime] = " & Chr(34) & Forms!frmMainMail!sfrmMail!ReceivedTime & Chr(34)
Set OlItemLocate = OlFolder.Items.Find(strSearch4)
I can do a loop through all the emails in the inbox, but that takes a long time, where as the FIND method is much faster.
Could you please give me the correct format to check for either ReceivedTime or the EnteryID (it says, the property 'EnteryID" in the condition is not valid).
OR another way to compare the email between my Form and the Outlook inbox.