Connecting Tech Pros Worldwide Help | Site Map

multipik boxes updating tables

RR
Guest
 
Posts: n/a
#1: Nov 12 '05
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


Mike Storr
Guest
 
Posts: n/a
#2: Nov 12 '05

re: multipik boxes updating tables


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:404b299b$1_1@127.0.0.1...[color=blue]
> 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[/color]
that[color=blue]
> 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[/color]
in[color=blue]
> 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
>
>[/color]


Closed Thread