Solved

Spell Check solution from ijafferr for Access Field. Spell Check window is sometimes beneath main window

Posted on 2008-10-21
4
568 Views
Last Modified: 2012-05-05
Hi, Jaffer's code (enclosed) is very helpful and generally works well however sometimes the Word Spell check window remains underneath the working window and the PC is virtually 'locked' waiting for an input to the spell window. ALT TAB can bring the spell window to the top, however can u supply a little additional code to the function or whatever to bring the spell check code to the foreground.
Thanks
jjafferr:Hey ssblue
Got your email,
What reminded you of me, it must be my comments to your new Sentence Case question ;o)
 
Lets take care of your Spell check:
 
1-
make a new module, call it SpellingCheck
 
2-
Paste the following code in the module
 
Function SpellCheck(CheckWhat)
    
    Dim X As Object
    CheckWhat.SetFocus
    Set X = CreateObject("Word.Application")
    X.Visible = False
    X.Documents.Add
    X.Selection.Text = CheckWhat.Text
    X.ActiveDocument.CheckSpelling
    CheckWhat.Text = X.Selection.Text
    X.ActiveDocument.Close savechanges:=wdDoNotSaveChanges
    X.Quit
    Set X = Nothing
    
End Function
 
3-
Save the module.
 
4-
In any Form, I will take WeekendScheduling SubForm as an example,
and will use the Field Housekeeping,
In Design view, Right click on Housekeeping and select properties,
go to On Lost Focus and paste the following there,
=SpellCheck([HouseKeeping])
 
5-
Save your Form.
 
Now, everytime you finish writing something in HouseKeeping field, the spell checker will check your spelling and will give you options for corrections.
 
For any Form/Field you want to spell check, on the Lost Focus of the field, paste
=SpellCheck([YourFieldName])
please change YourFieldName to the name of the field where you want to do the spell check,
in my example above,
YourFieldName was replaced with HouseKeeping
 
hope thi helps,
 
jaffer

Open in new window

0
Comment
Question by:jwjjwj
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 7

Expert Comment

by:donpricejr
ID: 22772858
Consider this spell check solution. I am not associated with this at all, but it is reliable, too and it may make more sense to meet you needs: http://www.pcesoft.com/Access-Spell-Checker-Tool-Source-Code.html
0
 
LVL 27

Accepted Solution

by:
jjafferr earned 500 total points
ID: 22789909
Hi

Nice to know that the code is still in use :)

Try this:
Place this code before calling the spell checker Function

AppActivate "microsoft word"

I have seen a few problems with MS Word acting like this,
if this didn't work, then we can simulate Alt Tab, but we will have to know the process ID of MS Word, which makes it a bit complicated.

jaffer
0
 
LVL 27

Expert Comment

by:jjafferr
ID: 22790274
0
 

Author Closing Comment

by:jwjjwj
ID: 31508576
Thanks jaffer, I knew u would have the answer.
Regards JW.
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

696 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question