before update event question

  • Thread starter Thread starter Guest
  • Start date Start date
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?
 
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
 
Back
Top