Spell check on access with out message box

S

Simon

On form close i run spell check with the following code
DoCmd.RunCommand acCmdSpelling

If there is not spelling mistakes it brings up message saying 'Spell
check complete' with Ok button

Is there a way to make sure this message box does not apear
 
T

Tom Wickerath

Hi Simon,

Have you tried using Set Warnings before and after?
Note: Use DoCmd.SetWarnings True in the ExitProc section, so that this is
executed even if an error occurs:

Option Compare Database
Option Explicit

Private Sub Form_Close()
On Error GoTo ProcError

DoCmd.SetWarnings False
DoCmd.RunCommand acCmdSpelling

ExitProc:
DoCmd.SetWarnings True
Exit Sub
ProcError:
MsgBox "Error " & Err.Number & ": " & Err.Description, _
vbCritical, "Error in procedure Form_Close..."
Resume ExitProc
End Sub


Tom Wickerath
Microsoft Access MVP
http://www.accessmvp.com/TWickerath/
__________________________________________
 
S

S.Clark

The spellchecker is a function of Office, not Access, so you can't trap for
an Office Warning.
 

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 check 1
spell checker 10
Spell check - round two 2
Spell Check 4
Spell Check Help 1
Spellcheck cmd button for current record only 1
MS Acccess Spell Checker VBA code 0
Spell Check Current Record 2

Top