Click to See Complete Forum and Search --> : HELP Access vb


siubo
September 11th, 2001, 10:28 AM
HELP!In Access 97 if i have a list box on a form, and i select one of the row from the list box~ how do i get those data from the row i selected and put those data on a exsisting form corresponding to the text fields??

Cimperiali
September 12th, 2001, 02:57 AM
'This code is in first form (where listbox is)
option Compare Database
option Explicit
Dim frm as Form_FormTwo 'I have a form named FormTwo where there is a textbox
'named Testo0

private Sub Elenco0_Click() 'Elenco0 is my listbox on FormOne
'It is associated to a table with three fields
'and I am showing second and third filed

set frm = Form_FormTwo

frm.Testo0.Text = Elenco0.Column(0) & Elenco0.Column(1)
frm.Visible = true
frm.SetFocus 'show the second form


End Sub





Special thanks to Lothar "the Great" Haensler, Tom Archer, Chris Eastwood, TCartwright, Bruno Paris, Dr_Micahel
and all the other wonderful people who made and make Codeguru a great place.
Come back soon, you Gurus.

The Rater