before update event question

G

Guest

How to use the beforeUpdate event

I have the following code in a text box before update event
Dim response As Integer
response = MsgBox("ok to update", vbYesNo, "test")
If response = 7 Then
DoCmd.CancelEvent
End If

..oldvalue should replace the text box. Value
Does anyone know how to make this happen?
 
D

David Whitaker

Dim response As Integer
Dim bytChoice as Byte

response = (MsgBox "ok to update", vbYesNo, "test")
If response = vbyes Then
'do whatever
End If
If response = vbno Then
cancel = true
End If
 

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