I'M Working on a project that I though I had figured out.
Short of it is that I'm linking access to lotus notes to automatically send an email to selected recipients.
I have a form that contains a list box where I can select whom I want to send the email to. The problem is that it puts the emails addresses one after the other seperated by a semi-colon:
ex: email1;email2;emails..ect
The problem is that Lotus notes only sends to the first recipient in the list, not the others.
So I understand that I need to "convert" into an array.
With my limited knowledge, I thought it would be easier to have 4 fields on the form, named email1,email2,email3 and email4 instead of a listbox.
I setup the code in the lotus notes module to retrieve the emails from those above fields.
so far, I can retrieve one email address but not all 4.
I have adapted the Lotus notes code that links to access ,that I obtained on tek-tips, to try and suit this need.
When I use the below code I get a compile error, type mismatch at the strTo= recipient line.
Here in an excerpt:
Dim rec2 As Form
Dim recipient(0 To 4) As String
Set rec2 = [Forms]![export]
recipient(1) = rec2![strTo]
recipient(2) = rec2![strTo3]
recipient(3) = rec2![strTo4]
recipient(4) = rec2![strTo5]
strTo = recipient
Can anyone help me get back on track??
If theres a way of doing this with a listbox, I would appreciate the help, if not I can live with having 4 dropdown boxes.
thanks
Short of it is that I'm linking access to lotus notes to automatically send an email to selected recipients.
I have a form that contains a list box where I can select whom I want to send the email to. The problem is that it puts the emails addresses one after the other seperated by a semi-colon:
ex: email1;email2;emails..ect
The problem is that Lotus notes only sends to the first recipient in the list, not the others.
So I understand that I need to "convert" into an array.
With my limited knowledge, I thought it would be easier to have 4 fields on the form, named email1,email2,email3 and email4 instead of a listbox.
I setup the code in the lotus notes module to retrieve the emails from those above fields.
so far, I can retrieve one email address but not all 4.
I have adapted the Lotus notes code that links to access ,that I obtained on tek-tips, to try and suit this need.
When I use the below code I get a compile error, type mismatch at the strTo= recipient line.
Here in an excerpt:
Dim rec2 As Form
Dim recipient(0 To 4) As String
Set rec2 = [Forms]![export]
recipient(1) = rec2![strTo]
recipient(2) = rec2![strTo3]
recipient(3) = rec2![strTo4]
recipient(4) = rec2![strTo5]
strTo = recipient
Can anyone help me get back on track??
If theres a way of doing this with a listbox, I would appreciate the help, if not I can live with having 4 dropdown boxes.
thanks