Spell Check data in a Memo Field

D

Don

I am trying to write my own command button that will spell
check data in my form (more specifically, a memo field).

Seems simple enough... I've used the code
DoCmd.RunCommand acCmdSpelling

The problem here is that it spell checks EVERY record,
even if I have selected text in my form. If I customize
and create my own toolbar, Access' "built-in" spell check
button works perfectly if I select specific text.

I would rather use a command button on my form than a
customized toobar. Is there anyway to modify the line of
code above to only spell check text I have selected,
rather than the entire form?

Thanks in advance,
Don
 
M

Marshall Barton

Don said:
I am trying to write my own command button that will spell
check data in my form (more specifically, a memo field).

Seems simple enough... I've used the code
DoCmd.RunCommand acCmdSpelling

The problem here is that it spell checks EVERY record,
even if I have selected text in my form. If I customize
and create my own toolbar, Access' "built-in" spell check
button works perfectly if I select specific text.

I would rather use a command button on my form than a
customized toobar. Is there anyway to modify the line of
code above to only spell check text I have selected,
rather than the entire form?


The big problem with using a form button to do this is that
as soon as you click the button, the memo field loses the
focus and it no longer has any text selected.

If you use the memo field's LostFocus event to save the
SelStart and SelLength properties in module level variables,
then the button can reset the focus back to the memo text
box and then reset the two properties before running the
spell check.

Seems like an awful lot of messing around just to avoid
using the windows standard toolbar button.
 

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

Similar Threads

Spell checking ... 1
Spell Check Help 1
Spell check on access with out message box 3
Spell check of form and subform 1
Spell Check Help 2
spell check 1
Spellcheck a single cell 11
Spell check resets listbox 11

Top