Code to save record Help

whoisit

Registered User.
Local time
Today, 03:40
Joined
Oct 27, 2004
Messages
28
I placed this code in the before event property for most of my forms. Before i close the form this code prompts whether you wish to save the new record.

Private Sub Form_BeforeUpdate(Cancel As Integer)
Dim Msg, Style, Title, MyString, Response
If Not Confirm Then

Beep
Msg = "Do you wish to save this data?"
Style = vbYesNo + vbExclamation + vbDefaultButton1
Title = "Confirm data entry"
Response = MsgBox(Msg, Style, Title)
If Response = vbYes Then
Else
Me.Undo
End If

End If
End Sub


The problem is it only works for one of my forms and not the rest
Why is that?
any solutions to fixing it
THANK YOU
 
Who,

Are they all "bound" forms?

What is?

If Not Confirm Then ...

Confirm doesn't seem to be declared.

Wayne
 

Users who are viewing this thread

Back
Top Bottom