Here's something I did years ago...It's the same basic code you already have, but uses the method ItsMe described to loop through all Textboxes on the Form. In a Standard Module, enter this code:
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
Then, behind your Command Button use the code
Linq ;0)>
The problem with making anything foolproof...is that fools are so darn ingenious!
All posts/responses based on Access 2003/2007