How might I click on several list box entries & have them be written to the body of an email?
![]() |
Patch reliability is unclear. Unless you have an immediate, pressing need to install a specific patch, don't do it. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
-
List box entries written to email (97)
Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » List box entries written to email (97)
- This topic has 4 replies, 3 voices, and was last updated 22 years, 4 months ago.
Viewing 0 reply threadsAuthorReplies-
WSHansV
AskWoody LoungerNovember 22, 2002 at 6:32 am #633715If you want the text to be assembled as the uses clicks each list box:
1. Declare a module-level string variable; it will be used as the message text (body) of the e-mail.
2. Add portions to the string in the OnClick event of each of the list boxes, something like
strMessage = strMessage & vbCrLf & lstListbox
3. Create the e-mail in the OnClick of a command button:
DoCmd.SendObject ObjectType:=acSendNoObject, MessageText:=strMessage
(You probably want to set more parameters; look up SendObject in the online help) -
WSarage
AskWoody Lounger -
WSHansV
AskWoody LoungerNovember 22, 2002 at 2:04 pm #633771If you have a multi-select list box, adding and removing strings on the fly will be a nightmare. I would use a command button instead and use code in the OnClick event that assembles the string variable based on the selected items in the list box:
Dim i As Long
Dim strReturn As String
Const clngColumnToReturn = 0
For i = 0 To lstMultiSelect.ListCount – 1
If lstMultiSelect.Selected(i) Then
strReturn = strReturn & lstExtended.Column(clngColumnToReturn, i) & vbCrLf
End If
Next iclngColumnToReturn is the zero-based index of the column that contains the text to be used. In the code above, it i 0 (the first column). Change if necessary.
-
WScharlotte
AskWoody Lounger
-
-
Viewing 0 reply threads -

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
Forcing(or trying to) save Local Documents to OneDrive
by
PateWilliam
4 hours, 24 minutes ago -
Hotpatch for Windows client now available (Enterprise)
by
Alex5723
5 hours, 3 minutes ago -
MS-DEFCON 2: Seven months and counting
by
Susan Bradley
1 hour, 23 minutes ago -
My 3 monitors go black & then the Taskbar is moved to center monitor
by
saturn2233
15 hours, 18 minutes ago -
Apple backports fixes
by
Susan Bradley
1 hour, 12 minutes ago -
Win 11 24H2 will not install
by
Michael1950
15 hours, 32 minutes ago -
Advice to convert MBR to GPT and install Windows 11 Pro on unsupported PC
by
Andy M
15 hours, 3 minutes ago -
Photos from iPhone to Win 10 duplicating/reformatting to .mov
by
J9438
43 minutes ago -
Thunderbird in trouble. Here comes Thundermail
by
Alex5723
15 hours, 20 minutes ago -
Get back ” Open With” in context menus
by
CWBillow
1 day, 4 hours ago -
Many AMD Ryzen 9800X3D on ASRock have died
by
Alex5723
1 day, 7 hours ago -
simple general stupid question
by
WSaltamirano
1 day, 1 hour ago -
April 2025 Office non-Security updates
by
PKCano
1 day, 19 hours ago -
Microsoft wants to hear from you
by
Will Fastie
19 hours, 6 minutes ago -
Windows 11 Insider Preview Build 22635.5160 (23H2) released to BETA
by
joep517
1 day, 22 hours ago -
Europe Seeks Alternatives to U.S. Cloud Providers
by
Alex5723
2 days, 4 hours ago -
Test post
by
Susan Bradley
2 days, 6 hours ago -
Used Systems to delete Temp files Gone WRONG what does this mean?
by
Deo
2 days, 8 hours ago -
SSD shuts down on its own
by
CWBillow
1 day, 23 hours ago -
OneDrive File Sharing Changes
by
David Clark
2 days, 16 hours ago -
OneDrive File Sharing Changes
by
David Clark
2 days, 18 hours ago -
Win 10 Pro 22H2 to Win 11 Pro 23H2 Conversion Guide
by
doneager
1 day, 18 hours ago -
Today is world backup day
by
Alex5723
2 days, 9 hours ago -
Windows .exe on Mint
by
Slowpoke47
14 hours, 45 minutes ago -
Reviewing your licensing options
by
Susan Bradley
4 hours, 9 minutes ago -
Apple has been analyzing your photos since September 2024
by
B. Livingston
1 day, 14 hours ago -
What Windows 11 24H2 offers beyond bugs
by
Lance Whitney
1 day, 10 hours ago -
Making sense of Settings in Windows 11
by
Simon Bisson
1 day, 12 hours ago -
Windows 11 pro fails to log in after upgrading Win 10 pro to Win 11 pro 24h2
by
ben_sitaud
2 days, 15 hours ago -
23H2 / 24H2 / Local v. Microsoft Account.
by
CWBillow
1 hour, 29 minutes ago
Recent blog posts
- MS-DEFCON 2: Seven months and counting
- Apple backports fixes
- April 2025 Office non-Security updates
- Microsoft wants to hear from you
- Reviewing your licensing options
- Apple has been analyzing your photos since September 2024
- What Windows 11 24H2 offers beyond bugs
- Making sense of Settings in Windows 11
Key Links
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.