Forum Discussion

Ken_Ravazzolo's avatar
Ken_Ravazzolo
Copper Contributor
Aug 05, 2022

VBA Issues in Windows 11?

I recently upgraded to Windows 11. I'm fully updated and have the latest Office 365 updates as well. Unfortunately, I'm finding that my "DoCmd.SetWarnings True" VBA actions no longer work in all my legacy Access apps. The action still works fine on my Windows 10 and Server 2019 devices. Anyone else experiencing this (or other VBA issues?)  Thanks!

  • Solved! It appears that during the installation of Office 365 on my new Windows 11 laptop, the Action Queries check box in Options -> Client Settings is disabled by default. This affected all databases on my laptop. I enabled it and all works fine.
  • Ken_Ravazzolo's avatar
    Ken_Ravazzolo
    Copper Contributor
    Solved! It appears that during the installation of Office 365 on my new Windows 11 laptop, the Action Queries check box in Options -> Client Settings is disabled by default. This affected all databases on my laptop. I enabled it and all works fine.
    • metzmatt's avatar
      metzmatt
      Copper Contributor

      Ken,

       

      I too have experienced some issues with VBA code in Outlook 365 that works on my W10 machine but not on either of my W11 machines. Some of the macros work (such as macros to do a unified search for all inboxes, or all trash, etc.). But there is Sub that was designed to recognize when an appointment was added to my calendar: if the subject includes "CM" set the busystatus to FREE and turn off the reminder.

       

      The code for this sub is pasted below.

       

      Your posting suggests something about Client Settings in Action Queries/Options. But as an amateur, I don't understand where to access these settings. A search of my computer for "Client Settings" or "Action Queries" comes up empty. Do these values relate to some sort of administrator program I'm not using on my Windows 11 Pro machine?

       

      Or do you see something else in the script below that accounts for why this works in W10 but not W11?

       

      Subroutine for Calendar:

       

      Private Sub Items_ItemAdd(ByVal Item As Object)
      On Error Resume Next
      Dim Appt As Outlook.AppointmentItem

      If TypeOf Item Is Outlook.AppointmentItem Then

      Set Appt = Item

      'Checks to see if all day and if it has a reminder set to true
      If InStr(1, Appt.Subject, "CM", 1) > 0 Then

      With Appt
      .BusyStatus = olFree
      .ReminderSet = False
      .Save
      End With
      End If
      End If
      End Sub

      • Tom_van_Stiphout's avatar
        Tom_van_Stiphout
        Steel Contributor
        > I don't understand where to access these settings.
        File > Options.
        While you're there, also go in the Trust Center and add a Trusted Location for your database folder.

Resources