I have a form with a subform that includes a combobox that lookups a value like:
The bound column is 1 and the widths are 0;1
From this form the user can open another form and choose values that could be placed in Table1. The code looks like this:
As you can see the user can choose from a listbox (lbx) and it will insert a record in Table1. The form "frm" and its subform named "chd" is requeried.
The Problem: The subform's combobox does not display the name even though the table1 id and name appear in the table.
Does anyone know how to display the value (field name is "Name"
in this field rather than blank?
Thanks,
Rewdee
Code:
SELECT ID, Name FROM Table1
From this form the user can open another form and choose values that could be placed in Table1. The code looks like this:
Code:
With CurrentDb.OpenRecordset("Table1", dbOpenDynaset)
For iRow = 0 To lbx.ListCount - 1
If Me.lbx.Selected(iRow) Then
.AddNew
![ID] = Me.lbx.Column(0, iRow)
![Name] = Me.lbx.Column(1, iRow)
.Update
End If
Next iRow
End With
Forms!frm.Form("chd").Requery
Exit Sub
As you can see the user can choose from a listbox (lbx) and it will insert a record in Table1. The form "frm" and its subform named "chd" is requeried.
The Problem: The subform's combobox does not display the name even though the table1 id and name appear in the table.
Does anyone know how to display the value (field name is "Name"
Thanks,
Rewdee