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
 
Back
Top