Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Spell Check a Specific text box?

Status
Not open for further replies.

rdpress

Technical User
Aug 16, 2002
24
0
1
US
I would like my users to be able to double-click a text box bound to a memo field and run spell check for that specific field. Currently I have a function that selects the current record and runs spell check on it, but I would like to limit it to the a single text box (the one they double-clicked on). Thanks much....
 
Have you tried using the double click event of the control(s) in question and:

[tt]docmd.runcommand accmdspelling[/tt]

When finished with the contents of that control, it will continue to the next control...

Roy-Vidar
 
I've just tried using the docmd.run command and it processes all the controls on the form, just as you said, but I want to spell just the control that is double-clicked.

I've got an idea and would like comments if you have a few minutes:

Sub SpellCheckIt()
'select current record
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70

'disable all controls on form
For each ctl in Me.Controls
with each ctl
ctl.Enabled = False
end with
Next ctl

'Enable Active control (not sure how to specify,
Screen.ActiveControl.Enabled = True

'Start Spell Check
DoCmd.RunCommand acCmdSpelling

End Sub

I think this will work, I see a few problems like needing to
reset all controls Enabled properties, I'm off to a meeting so I won;t be able to test put the code in for a while.

Thanks again...

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top