Many thanks a lot sir, you just opened my mind I think just taking your idea you wanted to say this, and it works ok
Public Sub txtProductCode_AfterUpdate()
Dim lngProdID As Long
Dim sReturn$, varValue As Variant
If Not (IsNull(mID)) Then
'DoCmd.GoToControl "sfrmPosLineDetails...