F
Frank Situmorang
Hello:
I want to make the default of the confirmation is No in the YesNo key,
because the tendency of people is just to hit enter while their purpose maybe
not to corrent. but
this VBA works for Exp Class field in my form, while it does not work for
Inovice Amount. Is that because of the type of the field si fifferent?, What
should I do.
I appceciate for any idea provided.
Thanks
Frank
Private Sub ExpClass_BeforeUpdate(Cancel As Integer)
If Not IsNull(Me.[ExpClass].OldValue) Then
If Me.[ExpClass] <> Me.[ExpClass].OldValue Then
If MsgBox("Anda telah merobah!!, apakah sengaja mau merobah?",
vbYesNo + vbDefaultButton2 + vbQuestion) = vbNo Then
' Undo the changes
SendKeys "{ESC}"
End If
End If
End If
End Sub
Private Sub Invoice_Amt_BeforeUpdate(Cancel As Integer)
If Not IsNull(Me.[Invoice Amt].OldValue) Then
If Me.[Invoice Amt] <> Me.[Invoice Amt].OldValue Then
If MsgBox("Anda telah merobah!!, apakah sengaja mau merobah?",
vbYesNo) = vbNo Then
' Undo the changes
SendKeys "{ESC}"
End If
I want to make the default of the confirmation is No in the YesNo key,
because the tendency of people is just to hit enter while their purpose maybe
not to corrent. but
this VBA works for Exp Class field in my form, while it does not work for
Inovice Amount. Is that because of the type of the field si fifferent?, What
should I do.
I appceciate for any idea provided.
Thanks
Frank
Private Sub ExpClass_BeforeUpdate(Cancel As Integer)
If Not IsNull(Me.[ExpClass].OldValue) Then
If Me.[ExpClass] <> Me.[ExpClass].OldValue Then
If MsgBox("Anda telah merobah!!, apakah sengaja mau merobah?",
vbYesNo + vbDefaultButton2 + vbQuestion) = vbNo Then
' Undo the changes
SendKeys "{ESC}"
End If
End If
End If
End Sub
Private Sub Invoice_Amt_BeforeUpdate(Cancel As Integer)
If Not IsNull(Me.[Invoice Amt].OldValue) Then
If Me.[Invoice Amt] <> Me.[Invoice Amt].OldValue Then
If MsgBox("Anda telah merobah!!, apakah sengaja mau merobah?",
vbYesNo) = vbNo Then
' Undo the changes
SendKeys "{ESC}"
End If