A
an
When I run the next code, after Cancel = True, appear Menu
with "You can't save this record at this time"
How is possible omit it, please.
Dim strField As String
Dim vFields As Variant
Dim i As Integer
Dim strMsg As String
vFields = Split("Field1,Field2", ",")
For i = 0 To UBound(vFields, 1)
If IsNull(Me(vFields(i))) = True Then
strField = vFields(i)
Exit For
End If
Next i
If strField <> "" Then
If MsgBox("Message: " & "'" & strField & "'",
vbOKOnly + vbInformation + _
vbDefaultButton2, "EMPTY") = vbOK Then
Me(strField).SetFocus
Cancel = True
' Form_Error Event
' (?)
Else
Me.Undo
End If
End If
Thanks in advance.
an
with "You can't save this record at this time"
How is possible omit it, please.
Dim strField As String
Dim vFields As Variant
Dim i As Integer
Dim strMsg As String
vFields = Split("Field1,Field2", ",")
For i = 0 To UBound(vFields, 1)
If IsNull(Me(vFields(i))) = True Then
strField = vFields(i)
Exit For
End If
Next i
If strField <> "" Then
If MsgBox("Message: " & "'" & strField & "'",
vbOKOnly + vbInformation + _
vbDefaultButton2, "EMPTY") = vbOK Then
Me(strField).SetFocus
Cancel = True
' Form_Error Event
' (?)
Else
Me.Undo
End If
End If
Thanks in advance.
an