Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Turning off Autocorrect

Status
Not open for further replies.

deckel

MIS
May 4, 2001
1
US
I have a client who is trying to turn off autocorrect globally in Access using the following VBA script: "Application.Autocorrect.ReplaceText = False"
It works fine in Excel but in Access 97, it produces the following error: "Method or data member not found"
I told him the message probably was due to him defining the code in one class module and calling it from another.
There are two workarounds, I told him. The first is storing the procedure in a standard module. Then, it can be called from any database but he has to convert class module procedures to standard module procedures.
The second procedure was to leave the class modules intact but write a standard module procedure for every class module in which he wants to use the procedure.
He tried and it didn't work.


He created a standard module and inserted a new Sub with just this one line
in Access-97:
Application.Autocorrect.ReplaceTxt = False
It doesn't work: the Application object does not even have an "AutoCorrect" component.

I instruct people in the general use of programs but I'm far from an expert in VBA. Can anyone tell me how to turn off autocorrect globally in Access 97?
like it does in Excel.
 
Unfortunately, I don't know of any way to turn off autocorrect in Access 97 programmatically (there might well be a way, though). As you correctly pointed out, the Application object doesn't have a Autocorrect property/method.
You can turn off autocorrect manually by selecting Tools/Autocorrect. You could also put Runcommand acCmdAutoCorrect in a module (class or normal, doesn't matter). This code shows the autocorrect dialog box.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top