Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error 3162 doesn't make sense to me 1

Status
Not open for further replies.

annie52

Technical User
Mar 13, 2009
164
US
Why does this code raise Error 3162 - You tried to assign the Null value to a variable that is not a Variant data type.

If Me.NewRecord Then
Forms![frmReqnWatch]![frmDisreps].Form![XrefReqnID]= Forms![frmReqnWatch]![ReqnID]
DoCmd.Requery
End If

I'm trying to pass the value from a text box in the main form to a text box in a subform Both are bound to numeric (long integer) fields in a table.
 
Hi Annie,

Are your object names correct?
[frmReqnWatch]
[ReqnID]
Make sure your form and textbox are actually named correctly.

If so, ReqnID contains a null value, e.g. ReqnID does not contain the ID that you are expecting.

ATB

Darrylle











Never argue with an idiot, he'll bring you down to his level - then beat you with experience.
 
Hi Darrylle. You were exactly right.

Forms![frmReqnWatch]![frmDisreps].Form![XRefReqnIDtoDisrepNum.ReqnID] = Forms![frmReqnWatch]![ReqnID]

Thanks so much for your feedback.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top