Results 1 to 7 of 7
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Sunrise, Florida
    Posts
    324
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Spell Checking (Access 2K)

    I would like to be able to spell-check a particular memo field located in a form. I don't want to spell-check all the data in the form. Is this possible? Any help appreciated. Thanks!!!

  2. #2
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Spell Checking (Access 2K)

    You can put this code in the AfterUpdate event of a control to spellcheck the contents of that control:

    DoCmd.SetWarnings False
    RunCommand acCmdSpelling
    DoCmd.SetWarnings True
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  3. #3
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Sunrise, Florida
    Posts
    324
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Spell Checking (Access 2K)

    Thanks for the info. The only problem I'm having is that the spell-checking jumps to other controls on its own. You see, my problem is the following: I force the user to type a block of text on a memo field (TempMemoFld). Once he/she is done, the text is appended to another memo field (PermMemoFld) that contains previous entries. The user is not allowed to edit PermMemoFld. So I want to spell-check TempMemoFld only, before that block of text is appended to PermMemoFld. I'm not interested in spell-checking anything else. Hope you can help. Thanks in advance!!

  4. #4
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Spell Checking (Access 2K)

    >>The only problem I'm having is that the spell-checking jumps to other controls on its own. <<

    I'm not sure I understand what you mean by this. It seems to me that you must be doing that append in the afterupdate event of the temp memo fld. So, insert the code I gave you just before that.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  5. #5
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Sunrise, Florida
    Posts
    324
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Spell Checking (Access 2K)

    Thanks once again by pointing me in the right direction. Solved my problem by adding the first two lines to your code:

    Me! TempMemoFld.SelStart = 1
    Me! TempMemoFld.SelLength = Len(TempMemoFld)
    DoCmd.SetWarnings False
    RunCommand acCmdSpelling
    DoCmd.SetWarnings True

    This way I limited the spell-checking to the block of text I wanted.

  6. #6
    2 Star Lounger
    Join Date
    Jul 2002
    Location
    Sacramento, CA
    Posts
    193
    Thanks
    3
    Thanked 1 Time in 1 Post

    Re: Spell Checking (Access 2K)

    I'm attempting to add spell checking to a memo field. I'm at a loss as to why your code is not working in my situation, I'm clearly overlooking something. The After Change event is being fired correctly and the spell checker finds the errors. However, when I accept the change two dialog boxes come up. The first tells me a macro or function in BeforeUpdae or Validation Rule is preventing the saving of the change. I'm not using either of these. The second dialog box tells me the field is locked or that I don't have permisson. Neither are true as I entered the text just prior to adding your code. Is there a lock being set by the spell checker that I need to deal with?

  7. #7
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Spell Checking (Access 2K)

    Although you can invoke the spelling checker in the Before Update or After Update event of the control, you cannot have it change anything, because that interferes with the update already set in motion. So basically, it is useless to invoke the spelling checker this way. <img src=/S/sorry.gif border=0 alt=sorry width=15 height=15>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •