F
Frank Situmorang
Hello,
I have created Yes or No Key for confirmation of change of data with the
following codes. How can we make the default ( I mean active key is No),
because the tendency is just to hit the key, while actually no ( sorry I do
know how to say it in English, but maybe you already understood it)
Private Sub SuplierNo_BeforeUpdate(Cancel As Integer)
If Not IsNull(Me.[SuplierNo].OldValue) Then
If Me.[SuplierNo] <> Me.[SuplierNo].OldValue Then
If MsgBox("Anda telah merobah!!, apakah sengaja mau merobah?",
vbYesNo) = vbNo Then
' Undo the changes
SendKeys "{ESC}"
End If
End If
End If
End Sub
I appreciate any idea provided.
Frank
I have created Yes or No Key for confirmation of change of data with the
following codes. How can we make the default ( I mean active key is No),
because the tendency is just to hit the key, while actually no ( sorry I do
know how to say it in English, but maybe you already understood it)
Private Sub SuplierNo_BeforeUpdate(Cancel As Integer)
If Not IsNull(Me.[SuplierNo].OldValue) Then
If Me.[SuplierNo] <> Me.[SuplierNo].OldValue Then
If MsgBox("Anda telah merobah!!, apakah sengaja mau merobah?",
vbYesNo) = vbNo Then
' Undo the changes
SendKeys "{ESC}"
End If
End If
End If
End Sub
I appreciate any idea provided.
Frank