I just copied a table to access from excel. I named that as "Contents".
I am trying to create a look-up field on a form which can return the tuples in a list box. My code is:
The problem is I am getting only one column in the list box. It searches well, but is not returning all the fields of the table. Can anyone help?
Thanks
I am trying to create a look-up field on a form which can return the tuples in a list box. My code is:
Code:
Option Compare Database Private Sub List3_BeforeUpdate(Cancel As Integer) End Sub Private Sub Text0_BeforeUpdate(Cancel As Integer) Dim holdVal As String holdVal = Me.Text0.Value Me.List3.RowSourceType = "Table/Query" Me.List3.RowSource = "SELECT * FROM Contents" & _ " WHERE Field4 LIKE '" & holdVal & "*'" Me.List3.Requery End Sub
Thanks
Comment