Microsoft
Software
Hardware
Network
Question : Access Multiselect Listbox code
I'm developing a string (StrHeading) of the selected listbox items within the following For loop. I want to put a comma between the item names, but not at the end of the string. (ie. if the choices are Red, Green and Blue, StrHeading will be "Red,Green,Blue".) What do I use for the # of items selected in the code below?
For Each varItem In ctl.ItemsSelected
StrHeading = StrHeading & ctl.ItemData(varItem)
If varItem <
# of items selected
StrHeading = StrHeading & ","
End If
StrInsert = ".......;"
DoCmd.RunSQL StrInsert
Next varItem
Answer : Access Multiselect Listbox code
The simplest way is to just parse the string after you fill it:
If Right(StrHeading, 1) = "," Then StrHeading = Right(StrHeading, Len(StrHeading) - 1)
Random Solutions
LUN unpresented from ESX hosts causing alarms
VPN between SSG 20 and RVO42 does not come up. "ERROR: Peer did not send a proxy id"
Logging computer off network
Trend Micro Officescan 10.0 on Citrix XenApp Presentation Server 4.5 or 5.0
Er diagram for university accommodation office
How to copy folders/files between computers and preserve modified date ?
Exchange 2003 (SBS) not sending or receiving.
SSIS reuse the object variable
bulk collect - amount of return
Need a driver for sm bus controller on Dell d620