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"

Dim oElements, oDropdown, oOption
Dim sSelected
Set oElements = Document.form7.Elements
set oDropDown = oElements("lstOffices"

For each oOption in lstOffices.Options
If lstOffices.Selected
frmAvailable.AddNew
frmAvailable.Fields("PersonID"

frmAvailable.Fields("OfficeID"

frmAvailable.Fields("Locale"

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