Forums
This topic is locked
Multiple Inserts from List Box
Posted 19 Feb 2001 18:02:29
1
has voted
19 Feb 2001 18:02:29 Jack Gillespie posted:
I'm having diffulty inserting records to a single Access table based on the value(s) contained in a multiple list box. The code I'm using is as follows:IF Request("btnSave"
![](/images/forum/smilies/icon_smile_wink.png)
Dim oElements, oDropdown, oOption
Dim sSelected
Set oElements = Document.form7.Elements
set oDropDown = oElements("lstOffices"
![](/images/forum/smilies/icon_smile_wink.png)
For each oOption in lstOffices.Options
If lstOffices.Selected
frmAvailable.AddNew
frmAvailable.Fields("PersonID"
![](/images/forum/smilies/icon_smile_wink.png)
frmAvailable.Fields("OfficeID"
![](/images/forum/smilies/icon_smile_wink.png)
frmAvailable.Fields("Locale"
![](/images/forum/smilies/icon_smile_wink.png)
frmAvailable.Update
End if
Next
End IF
Are there any extensions, behaviors, etc. that you know of to accomplish this task?
Thanks for any help you can provide.
Jack