D
dab1477
I have redirected this post from Coding to here...
I have a subform titled NewPartsSubForm. Within this form, I have a combo box
labled as Rtg_oper_num. I am able to choose from a listing of routings within
the box (I choose 100, 120, 140, 32156 etc from a listing). I want to
populate a Description filed within this same subform based upon the entry I
choose in the Rtg_oper_num field. I have a table call Operations, where I
have the operation number in one column and the operation descripton in an
adjacent column. I am trying to lookup the Rtg_oper_num entry on the subform;
match it to the Operation Number in the Operations table, and return the
Operation Description from the Operations table to the Description field on
the subform. At this point I have the following Afterupdate coded for the
Rtg_Oper_num field in the subform;
if RTG_OPER_num>0 then
me.oper_desc.value=DLookUp("[Oper_Desc]","[operations]","[rtg_oper_num]=Forms![newpartsubform]![rtg_oper_num]")
End if
End Sub
At this point I get the SAME value for all Decription Fields regardless of
the value of the RTG_oper_num field. Where am I going wrong? Thanks.
I'm fairly new to VBA. Your patience is appreciated.
I have a subform titled NewPartsSubForm. Within this form, I have a combo box
labled as Rtg_oper_num. I am able to choose from a listing of routings within
the box (I choose 100, 120, 140, 32156 etc from a listing). I want to
populate a Description filed within this same subform based upon the entry I
choose in the Rtg_oper_num field. I have a table call Operations, where I
have the operation number in one column and the operation descripton in an
adjacent column. I am trying to lookup the Rtg_oper_num entry on the subform;
match it to the Operation Number in the Operations table, and return the
Operation Description from the Operations table to the Description field on
the subform. At this point I have the following Afterupdate coded for the
Rtg_Oper_num field in the subform;
if RTG_OPER_num>0 then
me.oper_desc.value=DLookUp("[Oper_Desc]","[operations]","[rtg_oper_num]=Forms![newpartsubform]![rtg_oper_num]")
End if
End Sub
At this point I get the SAME value for all Decription Fields regardless of
the value of the RTG_oper_num field. Where am I going wrong? Thanks.
I'm fairly new to VBA. Your patience is appreciated.