With Microsoft Access 2000 I need to send an email, then move to a folder afterward. My code below does not work:

Public Function SendToRecipient(subject$, _
body$, _
GWA As GroupwareTypeLibrary.Account2, _
GWF As GroupwareTypeLibrary.Folder, _
rst_mail_recipient As Recordset) As Boolean
Dim GWM As GroupwareTypeLibrary.Message
Set GWM = GWA.RootFolder.Messages.Add
GWM.Recipients.Add "" & rst_mail_recipient!MrStaffAssignmentEmail
GWM.subject = SubstituteMeta(subject, rst_mail_recipient)
GWM.BodyText = SubstituteMeta(body, rst_mail_recipient)
GWA.AllFolders.ItemByName("SENT ITEMS").Messages.Move GWM, GWF.Messages
End Function

I keep getting the message "An invalid argument was passesd in the function call". From past experience this means I'm passing the wrong variable type as an argument. I've read the documentation numerous times and have used the correct syntax. I tried GWM.MessageID as the message argument, too. In the debug window if I display GWF.Messages.Count, the correct value is shown. If someone can help I'd appreciate it. My application is almost done.