Spelling Check

  • Thread starter Thread starter PizzaBoy
  • Start date Start date
P

PizzaBoy

Is there a function that can call the spell check to run on a field once it
has been changed?

Thanks for any help.
 
PizzaBoy said:
Is there a function that can call the spell check to run on a field once it
has been changed?

It is better to check them all, when you are done, than one at a time. This
function checks all the controls (that can be checked) on a form. Put it in
a standard modulue and call it from a command button like:

=Spell()

in the button's property sheet:

Public Function Spell()
' Arvin Meyer 9/17/1998
' Adapted from code by Terry Wickenden
Dim ctlSpell As Control
Dim frm As Form
Set frm = Screen.ActiveForm
DoCmd.SetWarnings False
' Enumerate Controls collection.
For Each ctlSpell In frm.Controls
If TypeOf ctlSpell Is TextBox Then
If Len(ctlSpell) > 0 Then
With ctlSpell
.SetFocus
.SelStart = 0
.SelLength = Len(ctlSpell)
End With
DoCmd.RunCommand acCmdSpelling
End If
End If
Next
DoCmd.SetWarnings True
End Function
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
 
Back
Top