mdemarte
Computer Wizard
- Local time
- Today, 10:50
- Joined
- May 8, 2001
- Messages
- 138
I have a form on which I find vendors. The form is called frmVendorFind and the record source is qryVendorFind. I have many fields on the form, which I might use to filter the form, such as a vendor type (vendtype) and mailing city (mailcity). Once I have filtered the form for the records that I want, then I want to gather the email address (email1) of each record, separate them by commas and put them into a Lotus notes e-mail as the ‘To’. The trick seems to be in getting the VBA code to recognize the filter. I am using Access 2000.
I adapted notes from wh00t from 12/3/02 to get the following, which gives me the e-mail address of the first record:
A button on the form whose on-click event is
SendMail Me![email1]
And then a Public Procedure -
Public Sub SendMail(strEmail As String)
Dim objNotesWS As Object
Dim notesdb As Object
Set objNotesWS = CreateObject("Notes.NotesUIWorkspace")
Set notesdb = objNotesWS.COMPOSEDOCUMENT(, , "memo")
notesdb.FIELDSETTEXT "EnterSendTo", strEmail
Set objNotesWS = Nothing
Set notesdb = Nothing
End Sub
TIA
I adapted notes from wh00t from 12/3/02 to get the following, which gives me the e-mail address of the first record:
A button on the form whose on-click event is
SendMail Me![email1]
And then a Public Procedure -
Public Sub SendMail(strEmail As String)
Dim objNotesWS As Object
Dim notesdb As Object
Set objNotesWS = CreateObject("Notes.NotesUIWorkspace")
Set notesdb = objNotesWS.COMPOSEDOCUMENT(, , "memo")
notesdb.FIELDSETTEXT "EnterSendTo", strEmail
Set objNotesWS = Nothing
Set notesdb = Nothing
End Sub
TIA