This really needs to be done in the Form_BeforeUpdate event, not in the Form_Close event. Assuming that you only want this message to pop up if data on an existing Record has been changed, all you'd need would be:
Code:
Private Sub Form_BeforeUpdate(Cancel As Integer)
If Not Me.NewRecord Then
Msgbox "My Message"
End If
End Sub
There's no need to check whether or not the Form has been Dirtied; if it hasn't been Dirtied, the Form_BeforeUpdate event won't fire!
Linq ;0)>
The problem with making anything foolproof...is that fools are so darn ingenious!
All posts/responses based on Access 2003/2007