G
Guest
This code is in a subform. The problem is that the
Me!EmailCC = Me!EmailCC.OldValue
does not put back the original value.
Private Sub EmailCC_BeforeUpdate(Cancel As Integer)
On Error Resume Next
If Nz(Trim(Me!EmailCC), vbNullString) = vbNullString Then
MsgBox "Email address cannot be blank." & vbCrLf & _
"If you want to delete the email address, select the line by
clicking" & _
" in the leftmost column, then press the 'Delete' key", ,
"Warning"
Me!EmailCC = Me!EmailCC.OldValue
Cancel = 1
Exit Sub
End If
End Sub
Me!EmailCC = Me!EmailCC.OldValue
does not put back the original value.
Private Sub EmailCC_BeforeUpdate(Cancel As Integer)
On Error Resume Next
If Nz(Trim(Me!EmailCC), vbNullString) = vbNullString Then
MsgBox "Email address cannot be blank." & vbCrLf & _
"If you want to delete the email address, select the line by
clicking" & _
" in the leftmost column, then press the 'Delete' key", ,
"Warning"
Me!EmailCC = Me!EmailCC.OldValue
Cancel = 1
Exit Sub
End If
End Sub