Using Access 2003 (2000 format)
A bound form called frmTrinity. On the form is a command button which, when clicked, opens an unbound form on which there is a listbox.
Behind a double click event for the listbox lies the following code
When I double click the listbox I want to be able to pull those 4 values and pass them to the relevant text box fields on frmTrinity.
What happens when I pull up the listbox form, and double click a row the 4 fields in frmTrinity go blank, but are not populated with the values from the listbox.
I have tried putting the listbox column values in variables but this doesn't work either.
Suggestions?
Thanks.
Tom
A bound form called frmTrinity. On the form is a command button which, when clicked, opens an unbound form on which there is a listbox.
Behind a double click event for the listbox lies the following code
Code:
Private Sub lstRetirementHomes_DblClick(Cancel As Integer)
If CurrentProject.AllForms("frmTrinity").IsLoaded Then
Forms!frmTrinity!HouseNbr = Me.lstRetirementHomes.Column(3)
Forms!frmTrinity!Street = Me.lstRetirementHomes.Column(4)
Forms!frmTrinity!City = Me.lstRetirementHomes.Column(5)
Forms!frmTrinity!Code = Me.lstRetirementHomes.Column(6)
End If
End Sub
When I double click the listbox I want to be able to pull those 4 values and pass them to the relevant text box fields on frmTrinity.
What happens when I pull up the listbox form, and double click a row the 4 fields in frmTrinity go blank, but are not populated with the values from the listbox.
I have tried putting the listbox column values in variables but this doesn't work either.
Suggestions?
Thanks.
Tom