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 SkipVought 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 using autoformat

Status
Not open for further replies.

Arcadi

Technical User
Jan 12, 2001
9
0
0
US
I am working with a user who keeps getting the error "Invalid use of Null" whenever she uses the autoformat function in forms in Access 2000. This occurs when she goes to format - autoformat, or when she is going through the new form wizard. She is on Windows 98se and we uninstalled Office, ran eraser2k and reinstalled Office and are still getting the same problem.

Has anyone ever run into this before and if you have do you remember what you did to fix it?
 
There's 2 possible reasons for this error which I have encountered. First, if you are using a combobox or listbox controls, with rowsources set to value, an empty value is always a zero length string.

The second is more tedious to straighten out. If the form is somehow connected to a table, and you attempt to modify a text field in the table that has the property set to No for Allow Zero Length, then this will cause you this type of error.

The problem is that is starts out as a null, but if it is changed for any reason and ends up with a zero length string, it will try to maintain that value and will not allow the record to be saved.

I have learn from experience that if you don't really care if the value is empty or not and there might be a chance that it could be that you make sure the property is set to Yes as you create a text type field in a table.

Hopefully this will be a starting point to resolve your issue.

Scott.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top