Error on Clicking any button on Access 2007

Anonymous
2019-01-14T13:40:54+00:00

So I have this protected MDE file from a Client, it works perfectly on their computers. But when I run it on my Laptop, I'm having an error on clicking any button.

Client side has Office 2007 and Microsoft Access Runtime 2007 installed. I've done the same, but still unable to access the functions of the Access file. I'm on Windows 10, so are the other computers that are able to successfully run this.

This is the error:

The expression On Click you entered as the event property setting produced the following error: Invalid use of Null.

* The expression may not result in the name of a macro, the name of a user-defined function, or [Event Procedure]

* There may have been an error evaluating the function, event or macro.

When I click "Help", I get the following:

"This error occurs when an event has failed to run because Microsoft Office Access cannot evaluate the location of the logic for the event. For example, if the OnOpen property of a form is set to =[Field], this error occurs because Access expects a macro or event name to run when the event is fired."

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes

9 answers

Sort by: Most helpful
  1. ScottGem 68,775 Reputation points Volunteer Moderator
    2019-01-14T19:43:54+00:00

    The error message is stating the problem. You are assigning a value that is Null to a variable that cannot handle a Null.

    The problem is you CANNOT fix this with an MDE. You need to know what line of code is throwing the error and what value it is pulling from and what value it is sending to. To do this, you need work with the original mdb file, not an mde.

    1 person found this answer helpful.
    0 comments No comments
  2. Anonymous
    2019-01-14T19:52:04+00:00

    I'll not asking this question as a developer. I'm asking it as a user.

    This program is a fully functional program for many years in many computers.

    I'm not here to fix it - I wanna be able to execute it as it's running well on other computers.

    1 person found this answer helpful.
    0 comments No comments
  3. ScottGem 68,775 Reputation points Volunteer Moderator
    2019-01-14T20:56:15+00:00

    I can appreciate that, but whoever wrote the problem did not account for Null values. The only thing you can do from a user perspective is make sure all values are filled in. 

    What you SHOULD do is go back to the developer and have them fix it.

    0 comments No comments
  4. Anonymous
    2019-01-14T21:04:45+00:00

    Well, that's not going to happen, cuz it ain't broken for those who are still running it successfully. More than 40+ computers are currently running it with no issues.

    It's just that it's not running on my laptop.

    Thanks for your response anyway. Much appreciated.

    1 person found this answer helpful.
    0 comments No comments
  5. ScottGem 68,775 Reputation points Volunteer Moderator
    2019-01-14T22:00:45+00:00

    You apparently don't seem to understand what is happening. Let me try to explain again.

    A Null value means a field contains no value at all. Not a blank (which is different). Certain datatypes cannot contain a Null value. There is code in the application that is assigning a Null value to a variable that cannot contain a Null value. 

    The problem here is no one can tell you where the Null value is coming from without seeing the code. So you either make sure there are no Null values anywhere. Of you find the offending code and get it fixed. 

    Those are your options. Sorry but we can't help anymore than that.

    0 comments No comments