I have been searching out VB code to accomplish a simple task and keep
running into snags. I have a form including these fields:
- ProjectCoordinatorReference:: Sikh Philosophy Network http://www.sikhphilosophy.net/information-technology/13996-simple-email-from-access-2003-form.html
The "ProjectCoordinator" control on the Courses form is a combo box
drawing from a related table called (T) Names. The "email" control is
automatically populated when the name is chosen.
I want to create a button that, when clicked, creates an email in
Outlook 2003 to the Project Coordinator and tells them that their
learning module has been uploaded and is ready for the staff.Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=13996
Here is the code I have so far - it is edited from the closest I could
find in another message here.
Private Sub Command231_Click()
Dim strTo As String
Dim strBody As String
Dim strSubject As String
strTo = DLookup(email, "(T) Names", "Name = " & Me.ProjectCoordinator)
strBody = "Your CBL with the title and course number shown above has
been published in the Learning Management System and is available for
strSubject = "Learing Module information"
DoCmd.SendObject , , acFormatTXT, strTo, , , strSubect, strBody, True
I am getting an error in the strTo line = Runtime error 3705. Syntax
error (missing operator) in query expression 'firstname.lastname@example.org'
Is this ensough info to tell where I am messing up?