multi-column list box

  • Thread starter Thread starter Kay
  • Start date Start date
K

Kay

Hi

On my form I have a tab control with 2 tabs. The first tabs got text
boxes etc to insert records into. The second box shows all my records
that are in the table
in a multi-column list box. What code can I use so that when I double
click on a row in my multi-column listbox, the record is displayed in
the first tab in my text boxes etc


Any help is much appreciated
 
Kay,

Combos and listboxes have columns. You can refer to those columns in code,
using the Column collection:

Private Sub lstMyListbox_Click()
If Not(IsNull(Me!lstMyListbox)) Then
Me!txtTextbox1 = Me!lstMyListBox.Column(0)
Me!txtTextbox2 = Me!lstMyListBox.Column(1)
Me!txtTextbox3 = Me!lstMyListBox.Column(2)
End If
End Sub

Regards,
Graham R Seach
Microsoft Access MVP
Canberra, Australia
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top