all. I inherited a database. On forms that need processing; the person who designed it has a "close button" and "refresh button". The users are under the impression that they cannot close without hitting the refresh button to save the record. Here's the code for the close button:
Code:
Private Sub Command35_Click()
On Error GoTo Err_Command35_Click
If Me.Dirty Then Me.Dirty = False
DoCmd.Close
Exit_Command35_Click:
Exit Sub
Err_Command35_Click:
MsgBox Err.Description
Resume Exit_Command35_Click
End Sub
To confirm; doesn't me.dirty = false save the record when they close? It seems redundant to hit the refresh then close. Here's the code for refresh:
Code:
Private Sub Command43_Click()
On Error GoTo Err_Command43_Click
DoCmd.RunCommand acCmdRefresh
Exit_Command43_Click:
Exit Sub
Err_Command43_Click:
MsgBox Err.Description
Resume Exit_Command43_Click
End Sub
Please verify. I would like to hide the refresh button so they will be forced to close the log to avoid locks.
Thanks