Hi Guys,
Does anybody know the code for canceling a change made using a combo box. I would like a message to appear before the Update. If the user opts for 'Yes' then the change should be registered. If the user selects 'No', the combo value should 'roll back' to its original value.
Tried using the following code, but it doesn't like the .CancelUpdate line of code.
Dim strSQL As String, X As Integer, astr As String
If IsNull(Me.Client_Id) Then
Exit Sub
Else
astr = Me.Client_Id
X = MsgBox("You are about to change an existing Client records. Click on 'Yes' to continue or", vbYesNo)
If X = vbYes Then
Exit Sub
Else
.CancelUpdate
End If
Any suggestions will be greatly appreciated!