I'd add the third parameter (in red) below, then you can put in whatever value you want.
Code:public sub Breakdown(byref frmToDo as form, byval strControl as string, byval strValue as string) '---- requires '---- the form to look at '---- the controls to update '---- Call like: '---- Breakdown me,"Vendor1", "0" frm.controls("TextBox" & strControl & "ImpInst").text = strValue frm.controls("TextBox" & strControl & "ImpWir").text = strValue 'etc. end sub




Reply With Quote