billgyrotech
Banned
- Local time
- Today, 04:43
- Joined
- Apr 18, 2013
- Messages
- 258
Hello,
I have a spelling checker (thanks to Missinglinq) that goes to error when the Status field on my form is "Closed" which makes the record read only.
Can there be an "If" statement to exit if the Status field on my form is "Closed"?
Thank you,
Bill
I have a spelling checker (thanks to Missinglinq) that goes to error when the Status field on my form is "Closed" which makes the record read only.
Can there be an "If" statement to exit if the Status field on my form is "Closed"?
Thank you,
Bill
Code:
Public Function SpellChecker()
Dim ctrl As Control
Dim frm As Form
Set frm = Screen.ActiveForm
DoCmd.SetWarnings False
For Each ctrl In frm.Controls
If TypeOf ctrl Is TextBox Then
If Len(ctrl) > 0 Then
With ctrl
.SetFocus
.SelStart = 0
.SelLength = Len(ctrl)
End With
DoCmd.RunCommand acCmdSpelling
End If
End If
Next
DoCmd.SetWarnings True
End Function