William Benson (VBACreations.Com)
vbacreations at gmail.com
Sat Jul 2 13:47:40 CDT 2011
Hi Mark, I am having some doubts I will be able to refer to .ListIndex at all directly in the sql. As to your suggestion of reversing the arguments, I don't think that is correct. The way to refer to the nth item in the 1st column of a listbox is: lst1.column(0,n). Thus to get the value in the 1st column on the row identified with the listindex is lst1.column(0, lst1.listindex) I guess at heart, my only open question is why LstFields.VALUE does not change when I change the index of the Selected property from, say, 0 to 1. For i = 0 To lstFields.ListCount - 1 lstFields.Selected(i) = True debug.print lstFields 'seems to remain the same throughout loop. Next -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Mark Simms Sent: Saturday, July 02, 2011 10:52 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Pulling Data from Excel into Access with "Automation" Just reverse the Column property arguments: lst1.ListIndex should be first.
More information about the AccessD mailing list