I have just completed some very small enhancements to a small system. This was with access 2016. I have deployed the software to 2 machines. 1 is using either 2010 or 2016 access the other is , I think 2007.
On the 2007 machine he is getting an error to a form that has not changed and worked before. A lot of forms have the "small door icon" to exit. The code on every (or at least most) of these forms is this
On Error GoTo Err_Command7A_Click
If Me.Dirty Then Me.Dirty = False
DoCmd.Close
Exit_Command7A_Click:
Exit Sub
Err_Command7A_Click:
MsgBox Err.Description
Resume Exit_Command7A_Click
I am effectively getting error 2455 with the message along the lines of
"you have specified an expression that contains an invalid reference to the dirty property."
On the forms where he is getting this error they are not bound to any record source. Having googled this to death it says that the me.dirty command won't work on unbound forms.
Okay this is fair enough and at first look an easy problem to overcome but the questions are why has this worked for the past 3/4 years and used on a daily basis for the 2007 machine, why does it still work for 2010/2016 and why has it suddenly stopped working for 2007.
AND as part of the deploy we copy the front end and database to a different folder on the clients machine and then relink tables. The older versions of the program still work. One of the things that WAS changed on one of the forms was getting rid of the ability to close the form using the small "x" in top right hand corner, but that wasn't done to all the forms that are now failing. Anybody got any ideas so I don't have to changed every single form that there is a problem with?
On the 2007 machine he is getting an error to a form that has not changed and worked before. A lot of forms have the "small door icon" to exit. The code on every (or at least most) of these forms is this
On Error GoTo Err_Command7A_Click
If Me.Dirty Then Me.Dirty = False
DoCmd.Close
Exit_Command7A_Click:
Exit Sub
Err_Command7A_Click:
MsgBox Err.Description
Resume Exit_Command7A_Click
I am effectively getting error 2455 with the message along the lines of
"you have specified an expression that contains an invalid reference to the dirty property."
On the forms where he is getting this error they are not bound to any record source. Having googled this to death it says that the me.dirty command won't work on unbound forms.
Okay this is fair enough and at first look an easy problem to overcome but the questions are why has this worked for the past 3/4 years and used on a daily basis for the 2007 machine, why does it still work for 2010/2016 and why has it suddenly stopped working for 2007.
AND as part of the deploy we copy the front end and database to a different folder on the clients machine and then relink tables. The older versions of the program still work. One of the things that WAS changed on one of the forms was getting rid of the ability to close the form using the small "x" in top right hand corner, but that wasn't done to all the forms that are now failing. Anybody got any ideas so I don't have to changed every single form that there is a problem with?