Spell Check data in a Memo Field

  • Thread starter Thread starter Don
  • Start date Start date
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
 
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.
 
Back
Top