If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Access > Passing through values from individual columns in Listboxes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-02-12, 23:07
Mythical Mythical is offline
Registered User
 
Join Date: Feb 2012
Posts: 1
Passing through values from individual columns in Listboxes

If I have a listbox with 4 columns displayed. Is it possible to pass the values from each of the columns to text fields on another form.
I can do it from 2 listboxes with only one column using the following code just wondering what I am missing

Me.TextBox1 = Forms!formname.listbox1
Me.TextBox2 = Forms!formname.listbox2

I have tried

Me.TextBox1 = Forms!formname.listbox1(0)
Me.TextBox2 = Forms!formname.listbox1(1)
Reply With Quote
  #2 (permalink)  
Old 02-03-12, 02:44
Sinndho Sinndho is offline
Registered User
 
Join Date: Mar 2009
Posts: 3,446
Try:
Code:
Me.TextBox1 = Forms!formname.listbox1.Column(0)
Me.TextBox2 = Forms!formname.listbox1.Column(1)
__________________
Have a nice day!
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On