By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,647 Members | 1,331 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,647 IT Pros & Developers. It's quick & easy.

Access 2010 -- need Application.SetOption method string to shut off autocorrection

P: 1
I need to be able to shut off the AutoCorrect "feature" within Access 2010 code. I have utilized Application.SetOption with method strings for other startup requirements, but I cannot seem to find a correct method string to turn off the text replace "feature." I am not talking about the "Track Name AutoCorrect Info" method, but rather the method that corresponds to the checkbox if one were to enter Access 2010 and click File, Options, Proofing, Autocorrect Options, Replace text as you type. Application.SetOption "Replace text as you type", False kicks out an error "Replace text as you type" is an invalid name (error 2091). Same with "Spelling text as you type" and "Replace Text As You Type" and any other permutation that I can think of. Does anyone have the correct method string? Thanks in advance.
Jan 29 '11 #1
Share this Question
Share on Google+
2 Replies


Expert Mod 2.5K+
P: 2,545
Hi. I'm sorry to say that after checking MSDN, help entries and the Access object model I've not come across a means of setting the specific global autocorrect settings for Access. SetOption does not appear to support the ReplaceText component of the AutoCorrect option dialogue, as it does not appear in the properties that can be set from VB (see this link from MSDN for reference).

Further, although there is an Autocorrect object in Access it does not have the same properties as the same-named Autocorrect object in Excel.

Had this been Excel you could simply have written

Expand|Select|Wrap|Line Numbers
  1. Application.AutoCorrect.ReplaceText = False
but Access does NOT support this, as the Access AutoCorrect object has no equivalent properties to the Excel AutoCorrect object.

I would suggest that in the circumstances you will have to turn off autocorrect for each of the textboxes or other controls concerned individually. This can be done from the properties of the textbox itself in design mode, by setting Allow Autocorrect to No, or in VBA like this:

Expand|Select|Wrap|Line Numbers
  1. Me!YourTextBoxName.AllowAutoCorrect = False
I find it somewhat concerning that there are such limiting differences in the behaviour of application objects of the same name within the Office environment.

-Stewart
Jan 29 '11 #2

P: 1
We have these regarding Auto Correct:

Application.SetOption "Perform Name AutoCorrect", True ' False
Application.SetOption "Log Name AutoCorrect Changes", True ' False
Application.SetOption "Track Name AutoCorrect Info", True ' False
Jun 21 '11 #3

Post your reply

Sign in to post your reply or Sign up for a free account.