Spell Check on a specific textbox only

J

Joe Leung

Hi folks,

Is there a way to limit the acCmdSpelling to a specific textbox? Right
now it checks the entire form.

Thanks
 
D

dpminusa

Joe said:
Hi folks,

Is there a way to limit the acCmdSpelling to a specific textbox? Right
now it checks the entire form.

Thanks

This works for me. If you want to check more than one field you have to add
a test for each one separately.

'Spell Check Current Record NOTES Field.
'Must check the length, because if it is zero then the spellcheck
'the spellcheck will check the entire form and the entire recordset

With Me.TestField
.SetFocus
If Len(.Text & vbNullString) > 0 Then
.SelStart = 0
.SelLength = Len(.Text)
DoCmd.RunCommand acCmdSpelling
End If
End With
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top