Results 1 to 8 of 8
  1. #1
    Star Lounger
    Join Date
    Sep 2002
    Location
    Hastings, Sussex, England
    Posts
    67
    Thanks
    0
    Thanked 1 Time in 1 Post

    Turning off annoying AutoCorrect functionality (2002)

    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,

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Turning off annoying AutoCorrect functionality (2002)

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

  3. #3
    Star Lounger
    Join Date
    Sep 2002
    Location
    Hastings, Sussex, England
    Posts
    67
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Turning off annoying AutoCorrect functionality (2002)

    Hans,

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

    JulesG

  4. #4
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Turning off annoying AutoCorrect functionality (2002)

    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:

    <code>
    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</code>

    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.
    Charlotte

  5. #5
    Star Lounger
    Join Date
    Sep 2002
    Location
    Hastings, Sussex, England
    Posts
    67
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Turning off annoying AutoCorrect functionality (2002)

    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

  6. #6
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: Turning off annoying AutoCorrect functionality (2002)

    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.
    Regards,
    Rory

    Microsoft MVP - Excel

  7. #7
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Turning off annoying AutoCorrect functionality (2002)

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

  8. #8
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: Turning off annoying AutoCorrect functionality (2002)

    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? <img src=/S/grin.gif border=0 alt=grin width=15 height=15>
    Regards,
    Rory

    Microsoft MVP - Excel

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •