A
Alex
Hi...ok I am stump. I have two list boxes let's call
them, lstVendors and lstAddedVendors. I want to add items
in my lstVendors to my lstAddedVendors. I have the
command button cmdAddVendor. Now the current code I have
is Private Sub cmdAddVendor_Click()
Dim frm As Form, ctl As Control
Dim varItm As Variant
Set frm = Forms!ByCourse
Set ctl = frm!lstCourseName
Dim count As Integer
' loop through each item they've selected and add it
to 'added courses'
For Each varItm In ctl.ItemsSelected
lstAddedVendors.AddItem (ctl.ItemData(varItm))
Next varItm
ctl.Requery
End Sub
Now this is from another database, for some reason when I
click on the button..it goes error .AddItem, the method
doesn't exist. Now I believe that the method is private
stored in some other database or something. How would I
create my own function off AddItem?? I just want to add
one item from one list box to the next. I know it's
asking a lot, but I'm stumped would be great help.
-Thanks
them, lstVendors and lstAddedVendors. I want to add items
in my lstVendors to my lstAddedVendors. I have the
command button cmdAddVendor. Now the current code I have
is Private Sub cmdAddVendor_Click()
Dim frm As Form, ctl As Control
Dim varItm As Variant
Set frm = Forms!ByCourse
Set ctl = frm!lstCourseName
Dim count As Integer
' loop through each item they've selected and add it
to 'added courses'
For Each varItm In ctl.ItemsSelected
lstAddedVendors.AddItem (ctl.ItemData(varItm))
Next varItm
ctl.Requery
End Sub
Now this is from another database, for some reason when I
click on the button..it goes error .AddItem, the method
doesn't exist. Now I believe that the method is private
stored in some other database or something. How would I
create my own function off AddItem?? I just want to add
one item from one list box to the next. I know it's
asking a lot, but I'm stumped would be great help.
-Thanks