Access Error 3162 - Null Value To A Variable

G

Guest

I receive the following error message:
You tried to assign the Null value to a variable that is not a Variant data
type. (Error 3162)
You tried to assign a Null value to a variable that is not a Variant data
type. Use the Dim statement to declare the variable as a Variant, and then
try the operation again.

When I input on the subform within the main form the message appears - it
does not appear on the subform if opened without being part of the main form.
Has anyone ever seen this message? I have not and I have been building
prototypes in Access for years! Thanks
 
S

storrboy

Yes.
Set the compiler to Break On All Errors (Tools > Options > Advanced)
and see what the offending line is by using the form as normal. The
code window should open to the error (unless this a mde). One or more
variables in that line needs to either be changed to a Variant type,
or additional code is needed to prevent the passing of a null value.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top