P
pedro
I am trying to auto-fill a combo-box on a form based on the selection from
another combo-box.
It is triggered on an after update event on the first combo-box selection.
The code I have is;
If not IsNull([Vehicle Model]) Then
Dim org as Variant
Dim pName As String
pName = [Vehicle Model].value
org = DLookup("shape","tbl_vehmodel","model = ' " & pName & "'")
End If
Shape is a field in the table tbl_vehmodel that I want to lookup based on
the name of the vehicle model selected in the combo-box. The combo-box I want
to auto-fill is called Vehicle Shape.
The syntax runs without errors however the Vehicle Shape field is not
populated.
Your suggestions would be greatly appreciated.
another combo-box.
It is triggered on an after update event on the first combo-box selection.
The code I have is;
If not IsNull([Vehicle Model]) Then
Dim org as Variant
Dim pName As String
pName = [Vehicle Model].value
org = DLookup("shape","tbl_vehmodel","model = ' " & pName & "'")
End If
Shape is a field in the table tbl_vehmodel that I want to lookup based on
the name of the vehicle model selected in the combo-box. The combo-box I want
to auto-fill is called Vehicle Shape.
The syntax runs without errors however the Vehicle Shape field is not
populated.
Your suggestions would be greatly appreciated.