S
scott04
Hello everyone,
I have a form that contains validation and inserts into a subform upon
passing validation. I have tried to place a spell check with the code,
DoCmd.RunCommand acCmdSpelling. However my validation code does not work if
there is a miss spelling. Can someone see if maybe the spell check code can
just be added with my validation code?
Dim strMsg As String
If IsNull(Me.Audit_nme) Then
Cancel = True
strMsg = strMsg & "Audit Name required." & vbCrLf
End If
If IsNull(Me.Auditor) Then
Cancel = True
strMsg = strMsg & "Auditor required." & vbCrLf
End If
If IsNull(Me.DateAudit) Then
Cancel = True
strMsg = strMsg & "Date Initiated." & vbCrLf
End If
If IsNull(Me.InitiationReason) Then
Cancel = True
strMsg = strMsg & "Initiation Reason." & vbCrLf
End If
If IsNull(Me.AuditDesc) Then
Cancel = True
strMsg = strMsg & "Audit Scope." & vbCrLf
End If
If IsNull(Me.ImpactedCenters) Then
Cancel = True
strMsg = strMsg & "Centers Impacted." & vbCrLf
End If
If Cancel Then
strMsg = strMsg & vbCrLf & "Correct the entry, or press <Esc> to
undo."
MsgBox strMsg, vbExclamation, "Invalid entry"
End If
Me.frmAuditLifesubform.Requery
Forms!frm_audit.Refresh
I have a form that contains validation and inserts into a subform upon
passing validation. I have tried to place a spell check with the code,
DoCmd.RunCommand acCmdSpelling. However my validation code does not work if
there is a miss spelling. Can someone see if maybe the spell check code can
just be added with my validation code?
Dim strMsg As String
If IsNull(Me.Audit_nme) Then
Cancel = True
strMsg = strMsg & "Audit Name required." & vbCrLf
End If
If IsNull(Me.Auditor) Then
Cancel = True
strMsg = strMsg & "Auditor required." & vbCrLf
End If
If IsNull(Me.DateAudit) Then
Cancel = True
strMsg = strMsg & "Date Initiated." & vbCrLf
End If
If IsNull(Me.InitiationReason) Then
Cancel = True
strMsg = strMsg & "Initiation Reason." & vbCrLf
End If
If IsNull(Me.AuditDesc) Then
Cancel = True
strMsg = strMsg & "Audit Scope." & vbCrLf
End If
If IsNull(Me.ImpactedCenters) Then
Cancel = True
strMsg = strMsg & "Centers Impacted." & vbCrLf
End If
If Cancel Then
strMsg = strMsg & vbCrLf & "Correct the entry, or press <Esc> to
undo."
MsgBox strMsg, vbExclamation, "Invalid entry"
End If
Me.frmAuditLifesubform.Requery
Forms!frm_audit.Refresh