• Turning off annoying AutoCorrect functionality (2002)

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Turning off annoying AutoCorrect functionality (2002)

    Author
    Topic
    #424448

    Hi!

    I’m familiar with using GetOption and SetOption to take control of the environment, e.g. stopping multiple taskbar windows. Ive been asked to turn off the autocorrect options, such as Correct Two Initial capitals. These do not seem to be controllable using SetOption. Application.AutoCorrect or .AllowAutoCorrect do not seem to work for Access 2002. Could someone please tell me if it possible to control these settings, before I waste the whole day!

    Thanks,

    Viewing 2 reply threads
    Author
    Replies
    • #974752

      I don’t think you can change AutoCorrect settings in code in Access.

    • #974758

      Hans,

      thanks. I can stop looking for a solution that doesn’t exist.

      JulesG

    • #974773

      You can control them at the form level by setting the AllowAutoCorrect property of the default for the type of control. If you use the following code create a template form named Normal, then any textbox controls you drop on new forms after that will have the autocorrect turned off. Here’s a bit of code to do that:


      Public Function SetDefaultAllowAutoCorrect()
      Dim frm As Form, ctlDefault As Control, ctlNew As Control
      Dim strName As String
      ' Create new form.
      Set frm = CreateForm
      ' Return Control object representing default TextBox.
      Set ctlDefault = frm.DefaultControl(acTextBox)
      ' Set the default properties.
      ctlDefault.AllowAutoCorrect = False
      ' Create new command button.
      Set ctlNew = CreateControl(frm.name, acTextBox, , , , 500, 500)
      strName = frm.name
      DoCmd.Close acForm, strName, acSaveYes
      DoCmd.Rename "Normal", acForm, strName
      End Function

      You can add any other controls that you want to turn autocorrect off for to this code easily enough, but textboxes are probably the primary control for this.

      • #974780

        Charlotte,

        thanks. For the existing application, I’ll just have to loop through all the forms and controls to set the individual text box settings – I’ve got some code I can use for this. Sometimes, there just isn’t a shortcut!

        JulesG

        • #974784

          From a quick test, it would appear that the Autocorrect settings for Access and Excel are stored in the registry at HKCUSoftwareMicrosoftOffice10.0CommonAutocorrect (if the Autocorrect key does not exist, then the default is for all options to be on). Within that key there can then be values of:
          CapitalizeNamesOfDays
          CapitalizeSentence
          CorrectTwoInitialCaps
          ReplaceText
          ToggleCapsLock

          which are all DWORDs and setting them to 0 turns these options off, though I don’t think it will necessarily affect the current session.

          • #974789

            I don’t think it would be acceptable to turn off AutoCorrection for all Office apps from Access in code…

            • #974791

              Nor do I really (though it doesn’t seem to affect Word) but MS seems to think that turning one off in one app should affect the others too, so who am I to argue? grin

    Viewing 2 reply threads
    Reply To: Turning off annoying AutoCorrect functionality (2002)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: