Turn off Auto Correct???

  • Thread starter Thread starter Katrina
  • Start date Start date
K

Katrina

I have an app done in Access 2000 that I am distributing as an mde. The
problem that I have come across is that spellings on certian words are
automatically changed when they do not need to be. Example: Cotten is
changed to Cotton. This is a name and does not need to be changed. I cannot
figure out how to turn this auto correct off. I have made sure that the
Option for the mdb file is turned off, but that seems to have no effect.


TIA
Kat
 
This untested aircode loops through all the forms in your database, and
turns off the AllowAutoCorrect property for all text boxes and combo boxes,
unless they are named "Notes" or "Comments".

Adapt to suit, and make a backup before use since this is untested and makes
wholesale changes.

Public Function FixAutoCorrect()
Dim accObj As AccessObject
Dim frm As Form
Dim ctl As Control
Dim strForm As String

For Each accObj In CurrentProject.AllForms
strForm = accObj.Name
DoCmd.OpenForm strForm, acDesign, windowmode:=acHidden
For Each ctl In frm.Controls
If ctl.ControlType = acTextBox Or ctl.ControlType = acComboBox
Then
If ctl.Name <> "Notes" And ctl.Name <> "Comments" Then
ctl.AllowAutoCorrect = False
End If
End If
Next
DoCmd.Close acForm, strForm, acSaveYes
Next

Set ctl = Nothing
Set frm = Nothing
Set accObj = Nothing
End Function
 
Back
Top