MLH <CR**@NorthState.net> wrote in
news:pn********************************@4ax.com:
I always seem to forget about that.
Well, it was bloody stupid of Microsoft to enable AutoCorrect by
default in all fields in a frigging *DATABASE* application.
Data validation is everything in a data base, and having a component
that is contollable from many different applications other than
Access and that the developer has no control over means that there's
a validation step going on that a developer has no control over.
To that end, I use the code at the end of my signature to turn off
AutoCorrect in all fields in all forms in an MDB.
This is an example of bloody idiocy on Microsoft's part, where
fidelity to the Office product line's normal featureset is in
contradiction to the basic purpose of the Access.
--
David W. Fenton
http://www.bway.net/~dfenton
dfenton at bway dot net
http://www.bway.net/~dfassoc
Public Sub GetRidOfAutoCorrect()
' Turns off AutoCorrect for all text boxes and
' combo boxes on all forms in an MDB
Dim cnt As Container
Dim doc As Document
Dim strForm As String
Dim frm As Form
Dim ctl As Control
For Each cnt In CurrentDb.Containers
If cnt.name = "Forms" Then
For Each doc In cnt.Documents
strForm = doc.name
DoCmd.OpenForm strForm, acDesign
For Each ctl In Forms(strForm).Controls
If ctl.ControlType = acTextBox _
Or ctl.ControlType = acComboBox Then
ctl.AllowAutoCorrect = False
End If
Next ctl
DoCmd.Close acForm, strForm, acSaveYes
Next doc
End If
Next cnt
Set cnt = Nothing
Set doc = Nothing
Set ctl = Nothing
End Sub