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

multipik boxes updating tables

P: n/a
RR
Hi,

I am having a little trouble not sure if want I want to do is possible. I
have a form that I would like to attach a multiselect list box on. The
multiselect box would list organizations responsible for a specific job that
appears in a combo box. The combo box is linked to a table with 125
different jobs, when a user selects a specific job, he or she would then
select all the organizations that would have responsibility for the task in
the list box. I want that task to be updated in a new table for each
organization that would be responsible for accomplishing it. I would be
happy to forward my current database with the form I an trying to program.

Thanks in advance.

Rob
Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
You will likely to have to make a function or sub that does this for you.
Example...
Include your own error trapping.

Function AppendJobOrgs(lstBox As ListBox, JobID As Variant) As Boolean
Dim rst As Recordset
Dim db As Database
Dim varItem As Variant

Set db = CurrentDB
set rst = db.OpenRecordset("tblName", dbOpenDynaset)

For Each varItem in lstBox.ItemsSelected
rst.Append
rst!JodID = JobID
rst!Org = lstBox.ItemData(varItem)
rst.Update
Next varItem

End Function

Mike Storr
www.veraccess.com
"RR" <RR@HOTMAIL.COM> wrote in message news:40**********@127.0.0.1...
Hi,

I am having a little trouble not sure if want I want to do is possible. I
have a form that I would like to attach a multiselect list box on. The
multiselect box would list organizations responsible for a specific job that appears in a combo box. The combo box is linked to a table with 125
different jobs, when a user selects a specific job, he or she would then
select all the organizations that would have responsibility for the task in the list box. I want that task to be updated in a new table for each
organization that would be responsible for accomplishing it. I would be
happy to forward my current database with the form I an trying to program.

Thanks in advance.

Rob

Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.