F
Frank Situmorang
Hello,
I want to ask again my question in my last time thread, regarding asking
confirmation whether to do changes or not.
My question is why for some computer this code works, and for some is not
Private Sub SuplierNo_BeforeUpdate(Cancel As Integer)
If Not IsNull(Me.[ProjectID].OldValue) Then
If Me.[ProjectID] <> Me.[ProjectID].OldValue Then
If MsgBox("Anda telah merobah!!, apakah sengaja mau merobah?",
vbYesNo + vbDefaultButton2 + vbQuestion) = vbNo Then
' Undo the changes
SendKey "{Esc}"
Cancel = True
End If
End If
End If
End Sub
But when we change it to after update and replace SendKey "{Esc}"
Cancel = True
with Me.[ProjectID] = Me.[ProjectID].OldValue
It works.
But for some computers of my subbordinates it works even with the old VBA. I
wonrder it happenned on my computer as a developper.
Pls. help
I want to ask again my question in my last time thread, regarding asking
confirmation whether to do changes or not.
My question is why for some computer this code works, and for some is not
Private Sub SuplierNo_BeforeUpdate(Cancel As Integer)
If Not IsNull(Me.[ProjectID].OldValue) Then
If Me.[ProjectID] <> Me.[ProjectID].OldValue Then
If MsgBox("Anda telah merobah!!, apakah sengaja mau merobah?",
vbYesNo + vbDefaultButton2 + vbQuestion) = vbNo Then
' Undo the changes
SendKey "{Esc}"
Cancel = True
End If
End If
End If
End Sub
But when we change it to after update and replace SendKey "{Esc}"
Cancel = True
with Me.[ProjectID] = Me.[ProjectID].OldValue
It works.
But for some computers of my subbordinates it works even with the old VBA. I
wonrder it happenned on my computer as a developper.
Pls. help