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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

invalid use of NULL

Status
Not open for further replies.

artdept

Technical User
Jun 3, 2002
8
US
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top