Encountering the “Run-time error ‘94’: Invalid use of Null” in the meanwhile handling your MS Access database can be really distressing. This error typically occurs due to missing value in a field, conflicting programs, partial installation, or corrupt download of the Microsoft Access software, etc. (Here’s the error image).
Well, if you are facing this error, read this article to learn the possible reasons for triggering run time error 94 invalid use of null error, and how to troubleshoot it. Also, you will get the best Access Repair Tool here to fix this error if it has occurred due to database corruption
So, without any further ado, let’s get started…
Free MS Access Database Repair Tool
Repair corrupt MDB and ACCDB database files and recover deleted database tables, queries, indexes and records easily. Try Now!
By clicking the button above and installing Stellar Repair for Access (14.8 MB), I acknowledge that I have read and agree to the End User License Agreement and Privacy Policy of this site.
Table of Contents:
What Does Run-Time Error ‘94’: Invalid Use of Null Mean?
How to Fix Microsoft Access Error Code 94: Invalid Use of Null?
- Close the Conflicting Programs
- Run VBA Code Using NZ Function
- Repair Database Using Compact and Repair Utility
- Execute Windows Clean Installation
- Repair Corrupt/Damaged MS Access Database
What Does Run-Time Error ‘94’: Invalid Use of Null Mean?
When the Access runtime error 94 invalid use of null occurs then it simply means that there’s a blank field in the Access database or it’s in an incorrect format.
On the other hand, we can say that when you try to use a Null value to perform a certain operation that isn’t allowed by the context of your VBA code then it can show this error. Null represents the missing value.
However, this runtime error is triggered due to various reasons. below I have specified the major ones:
- Conflicting the programs
- Access database corruption
- Due to missing value in a field
- Partial installation of an Access program.
This Access error can be easily fixed by applying a few tricks mentioned in the next section.
How to Fix Microsoft Access Error Code 94: Invalid Use of Null?
Follow the below step-by-step methods to troubleshoot runtime error 94:
Fix 1- Close the Conflicting Programs
In most of the cases, it has been seen that run-time errors in Access occur due to programs conflicting with each other.
So, if you are suspicion that the runtime error 94 has occurred because of conflicting programs, simply stop them.
For this, follow the below steps:
- On your Windows desktop, click Ctrl + Alt + Del keys >> click on Task Manager.
- Now, you will get the list of programs that are currently running in the background.
- After this, go to a Processes tab & stop each program and then click the End Process button.
- After completing these steps, you have to check for the error. If the issue still persists then follow the next solutions.
Fix 2- Run VBA Code Using NZ Function to Fix Microsoft Access Error Code 94
Since you are experiencing the “invalid use of null” error message in Access so, it is recommended to run VBA using the NZ function. The NZ is a very useful function for trapping the errors triggered by NULL or missing values.
All you need to do is to consider running this streamlined VBA code by using the NZ function:
Dim U As String
U = NZ(Me.txtUnlock,0)
Dim fail as Boolean
If Not IsNumeric(U) Then
MsgBox “Unlock pin only accepts numbers only.”, , “Retail unlock”
fail = true
ElseIf Len(U) <> 4 Then
MsgBox “Retail unlock must be four digits long.”, , “Retail unlock”
fail = true
End If
If fail then
With Me.txtUnlock
.value = vbNullString
.SetFocus
End With
End If
And you are done!
This will eventually help you to solve your problem.
Fix 3- Repair Database Using Compact and Repair Utility
As already mentioned above, corruption in the Access database is the foremost reason for the occurrence of the run time error 94 invalid use of null Access.
In such a case, running MS Access Compact & Repair tool can come handy. But before using this Access built-in tool, it is essential to remember the following things:
- Create a valid backup of your crucial database files.
- Get adequate permission in order to run compact & repair functions.
- Remember the System recovery error table.
How to Compact and Repair Database:
- Open Microsoft Access program.
- Next, double-tap on a Blank desktop database.
- Go to the File >> click on Close.
- Now, on the Blank Database >> go to a File
- In the Database Tools, you have to click on “Compact and Repair Database”.
- Then, choose the Access database throwing a runtime error 94 & which you wish to compact & repair. Click Compact.
Finally, you will get a copy of repaired database saved in the location where your actual file is stored.
Fix 4: Execute Windows Clean Installation
Many users have reported that they fixed MS Access VBA run time error 94 invalid use of null by reinstalling the Windows operating system. therefore, you should also try to reinstall Windows OS.
This will erase everything from your hard drive and allow your system to start fresh.
Fix 5: Repair Corrupt/Damaged MS Access Database
Even after following the above methods, if the error still persists, you should opt for MS Access Repair and Recovery Tool. This program will eventually help you to repair the corrupt Access database and solve run time error 94 successfully.
Although it has the ability to fix corruption in .mdb or .acccdb files & recover data from the corrupted Access database.
Not only this, it also restores the indexes, relations, tables, queries, and other stuff in a few simple clicks.
Key Features of Access Repair & Recovery:
- Easily retrieve deleted linked tables, forms, tables, modules, indexes, reports, relations, queries, records, macros, etc.
- Restores password-protected Access DB or encrypted database.
- Supports all the OS VERSIONS like 11, 10, 8.1, 8, 7, Vista, & XP.
- Compatible with Access 2010, 2013, 2016, 2019& later versions.
- User-friendly
- 100% trusted & easy to use.
* By clicking the Download button above and installing Stellar Repair for Access (14.8 MB), I acknowledge that I have read and agree to the End User License Agreement and Privacy Policy of this site.
So, just download & install this program on your PC & follow the below steps to learn how it works:
How to Prevent Runtime Error 94 Invalid Use of Null Windows 10/11?
To prevent the Access error “Invalid use of Null“, it’s vital to implement good practices. You should always create a backup of your crucial Excel file to avoid severe data loss. Besides, always verify for Null values before you use them in calculations. There is a tool available in Microsoft Excel to handle nulls that is Nz() function.
In simple words, Nz() function is used to handle the null (empty) values in Access calculations or expressions.
Time to Conclude:
Well, I have stated all the possible solutions to fix Microsoft Access error code 94: invalid use of null.
So, try them one by one until your issue gets resolved. And even do share your experiences with us.
Apart from that, if any of you’ve more solutions to troubleshoot this specific error code, you can comment on our Facebook or Twitter accounts.
Good Luck…!
This software repairs & restores all ACCDB/MDB objects including tables, reports, queries, records, forms, and indexes along with modules, macros, and other stuffs effectively.
- Download Stellar Repair for Access rated Great on Cnet (download starts on this page).
- Click Browse and Search option to locate corrupt Access database.
- Click Repair button to repair & preview the database objects.