By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,994 Members | 2,036 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,994 IT Pros & Developers. It's quick & easy.

Emailing multiple list box items from ms access using Lotus Notes

P: n/a
I am using Ms Access to send email automatically through Lotus Notes.
What I require now is that I have a List Box in my form which when
loads,fills in the data's from the backend table.
In the body of the mail,I use the object that contains the item
selected from the list.
i.e. MailDoc.Body=ListBox225.Column(0) & List225.Column(1)
When an email is generated,it output is as below.

126 Rupam.

Now I want a syntax code that would include multiple rows from the list
box and not just 1 row.

Please can you help me with this I am in desparate need of it.

Your help much appreciated.

Regards
Rupam.

Aug 9 '06 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Kinda pushy if you're asking for help... search the NG for listbox and
AddItem. Otherwise, please SEND MONEY.

there's an example at www.mvps.org/access

happy searching, happy finding, happy learning.

Aug 9 '06 #2

P: n/a
Something like

Dim intIndex As Integer

With Me.ListBox225
For intIndex = 0 To .ListCount - 1
If .Selected(intIndex) Then
' do the stuff you're doing with 1 e-mail in here e.g.
MailDoc.Body = .Column(0, intIndex) & .Column(1, intIndex)

End If
Next
End With
--

Terry Kreft
"Rups" <ru**********@gmail.comwrote in message
news:11**********************@n13g2000cwa.googlegr oups.com...
I am using Ms Access to send email automatically through Lotus Notes.
What I require now is that I have a List Box in my form which when
loads,fills in the data's from the backend table.
In the body of the mail,I use the object that contains the item
selected from the list.
i.e. MailDoc.Body=ListBox225.Column(0) & List225.Column(1)
When an email is generated,it output is as below.

126 Rupam.

Now I want a syntax code that would include multiple rows from the list
box and not just 1 row.

Please can you help me with this I am in desparate need of it.

Your help much appreciated.

Regards
Rupam.

Aug 9 '06 #3

P: n/a
Hi Terry,

I have tried using the code below but it gives an error as below.

91:Object variable or With block variable not set.

Please could you advise.

Regards
Rupam

Terry Kreft wrote:
Something like

Dim intIndex As Integer

With Me.ListBox225
For intIndex = 0 To .ListCount - 1
If .Selected(intIndex) Then
' do the stuff you're doing with 1 e-mail in here e.g.
MailDoc.Body = .Column(0, intIndex) & .Column(1, intIndex)

End If
Next
End With
--

Terry Kreft
"Rups" <ru**********@gmail.comwrote in message
news:11**********************@n13g2000cwa.googlegr oups.com...
I am using Ms Access to send email automatically through Lotus Notes.
What I require now is that I have a List Box in my form which when
loads,fills in the data's from the backend table.
In the body of the mail,I use the object that contains the item
selected from the list.
i.e. MailDoc.Body=ListBox225.Column(0) & List225.Column(1)
When an email is generated,it output is as below.

126 Rupam.

Now I want a syntax code that would include multiple rows from the list
box and not just 1 row.

Please can you help me with this I am in desparate need of it.

Your help much appreciated.

Regards
Rupam.
Aug 9 '06 #4

P: n/a
You still have to do all the other things your current code does.

I would guess the error is on the line
MailDoc.Body = .Column(0, intIndex) & .Column(1, intIndex)

and that you haven't done the bit where you set the MailDoc variable, i he
error isn't there come back to me.
--

Terry Kreft
"Rups" <ru**********@gmail.comwrote in message
news:11**********************@h48g2000cwc.googlegr oups.com...
Hi Terry,

I have tried using the code below but it gives an error as below.

91:Object variable or With block variable not set.

Please could you advise.

Regards
Rupam

Terry Kreft wrote:
Something like

Dim intIndex As Integer

With Me.ListBox225
For intIndex = 0 To .ListCount - 1
If .Selected(intIndex) Then
' do the stuff you're doing with 1 e-mail in here e.g.
MailDoc.Body = .Column(0, intIndex) & .Column(1, intIndex)

End If
Next
End With
--

Terry Kreft
"Rups" <ru**********@gmail.comwrote in message
news:11**********************@n13g2000cwa.googlegr oups.com...
I am using Ms Access to send email automatically through Lotus Notes.
What I require now is that I have a List Box in my form which when
loads,fills in the data's from the backend table.
In the body of the mail,I use the object that contains the item
selected from the list.
i.e. MailDoc.Body=ListBox225.Column(0) & List225.Column(1)
When an email is generated,it output is as below.
>
126 Rupam.
>
Now I want a syntax code that would include multiple rows from the
list
box and not just 1 row.
>
Please can you help me with this I am in desparate need of it.
>
Your help much appreciated.
>
Regards
Rupam.
>

Aug 9 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.