Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Microsoft Access > ItemsSelected S...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 3 Topic 30154 of 30796
Post > Topic >>

ItemsSelected Seems not to work

by "KC-Mass" <connearneyATcomcastDOTnet> May 2, 2008 at 05:55 PM

I am working with a multi select list box in access.  The code is:

Sub MoveToCustomer2()
    Dim frm As Form, Ctl As Control
    Dim varItem As Variant
    Set frm = Forms!frmResolveCustomers
    Set Ctl = frm!lstUnassigned
    For Each varItem In Ctl.ItemsSelected
        Debug.Print varItem
        Debug.Print Ctl.Column(0)
    Next varItem
End Sub

If I select items 2, 3, 6and 8 the program prints 1,2,5,7 which is correct

(zero based)but for
ctl.Column(0) it prints the value of the first selectedItems for each of
the 
4 selected records.

They should all be different.

Is the reference to the column wrong?


Thx

Kevin
 




 3 Posts in Topic:
ItemsSelected Seems not to work
"KC-Mass" <c  2008-05-02 17:55:22 
Re: ItemsSelected Seems not to work
Salad <oil@[EMAIL PROT  2008-05-03 08:06:16 
Re: ItemsSelected Seems not to work
"KC-Mass" <c  2008-05-03 11:35:56 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan13V112 Thu Jul 24 5:47:39 CDT 2008.