I just created a customer data base. I went to print a report based on customer sales (not having changed a thing on the report) and it tells me "Invalid Use of Null"
My question(s): How did this occur? & How do I fix it?
It means that you have a null value somewhere you didn't plan for it. Perhaps there is a field in your database that should have a value but doesn't always, and you're using it in a VBA expression somewhere (such as a calculated control).
One approach to solving it would be to examine your database and fill in any missing values. If that doesn't work, or if missing values are expected, you'll have to look at every expression you've used in control properties, form properties, VBA modules, or a query underlying your report. Look for somewhere you've used a field, a control, or a VBA variable that could contain a Null value, in a place where a Null value isn't allowed.
Fields in tables and queries have Null values whenever they are empty. Likewise controls on forms and reports. Variables can have Null values only if they are declared as type Variant, declared without a type, or undeclared (meaning no Dim statement for them). Rick Sprague
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.