AfterUpdate event of Form

  • Thread starter Ladislav P via AccessMonster.com
  • Start date
L

Ladislav P via AccessMonster.com

Hi,
I need save new/updated record but just after when user of database decides
to save it. I think it muss be done with a pop up window with Question "Do
you will save changes/new record?" with 2 Buttons "Yes" or "Not".
Can someone help me??

Thanks in adwance
 
T

tina

try the following in the form's BeforeUpdate event, as

Private Sub Form_BeforeUpdate(Cancel As Integer)

If MsgBox("Do you want to save changes/new record?", _
vbYesNo + vbDefaultButton2) = vbNo Then
Cancel = True
Me.Undo
End If

End Sub

hth
 
L

Ladislav P via AccessMonster.com

Your help is excellent - it work without one error.

Thanks, thanks, thanks ...


L.P.
try the following in the form's BeforeUpdate event, as

Private Sub Form_BeforeUpdate(Cancel As Integer)

If MsgBox("Do you want to save changes/new record?", _
vbYesNo + vbDefaultButton2) = vbNo Then
Cancel = True
Me.Undo
End If

End Sub

hth
Hi,
I need save new/updated record but just after when user of database decides
[quoted text clipped - 3 lines]
Thanks in adwance
 
T

tina

you're welcome :)


Ladislav P via AccessMonster.com said:
Your help is excellent - it work without one error.

Thanks, thanks, thanks ...


L.P.
try the following in the form's BeforeUpdate event, as

Private Sub Form_BeforeUpdate(Cancel As Integer)

If MsgBox("Do you want to save changes/new record?", _
vbYesNo + vbDefaultButton2) = vbNo Then
Cancel = True
Me.Undo
End If

End Sub

hth
Hi,
I need save new/updated record but just after when user of database
decides
[quoted text clipped - 3 lines]
Thanks in adwance

--
L.Petko


Message posted via AccessMonster.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top