Hi all
I have the below code for two text boxes when the command button is clicked it checks these two TextBoxes which works fine, the only issue is that once its searched the first box it comes up with spell check complete then moves to the second and does the same, is it possible to change the code slightly so it automatically checks both boxes then shows just one spell check complete?
I was wondering if there is a way in the code to group TEXTBOX1 and TEXTBOX2 under one code name maybe sort the issue?
I have the below code for two text boxes when the command button is clicked it checks these two TextBoxes which works fine, the only issue is that once its searched the first box it comes up with spell check complete then moves to the second and does the same, is it possible to change the code slightly so it automatically checks both boxes then shows just one spell check complete?
I was wondering if there is a way in the code to group TEXTBOX1 and TEXTBOX2 under one code name maybe sort the issue?
Code:
With Me![TEXTBOX1]
If Len(.Value) > 0 Then
.SetFocus
.SelStart = 1
.SelLength = Len(.Value)
DoCmd.RunCommand acCmdSpelling
.SelLength = 0
End If
End With
With Me![TEXTBOX2]
If Len(.Value) > 0 Then
.SetFocus
.SelStart = 1
.SelLength = Len(.Value)
DoCmd.RunCommand acCmdSpelling
.SelLength = 0
End If
End With
DoCmd.SetWarnings True