Results 1 to 5 of 5
  1. #1
    cjl8on is offline Novice
    Windows 10 Access 2016
    Join Date
    Feb 2025
    Posts
    3

    NO VBA Code Will Execute

    I have a database I created in Access 2016 32-bit. A user was recently upgraded to Access 2019 64-bit. The front end is an accdb file and she copied it to the exact same location that she ran the 2016 file from. All security controls are handled via enterprise policy, so she has all the same policies that I do. However, NO VBA code will execute across the entire front end set of forms and reports. Not even a simple test button I just inserted that does nothing more put up a message box.



    All the buttons that were created with built in macros or the Command Button Wizard work fine, but nothing with VBA works - not even opening the form to the latest record on load.

    I've read some articles about using prtsafe and longptr to convert 32-bit to 64-bit, but I don't have any "Declare" or "Long" statements anywhere so I don't know if that applies or what else I might need to do? Does anyone have any thoughts?

  2. #2
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,569
    How did she get the new file?
    If downloaded you need to unblock it in file properties.

    PtrSafe etc is only for any APIs. It would still run, but error most likely.

    You should not be supplying a accdb, but an accde at least.

    https://www.google.com/search?q=unbl...hrome&ie=UTF-8
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  3. #3
    cjl8on is offline Novice
    Windows 10 Access 2016
    Join Date
    Feb 2025
    Posts
    3
    She did not get a new file. She used the same Access file she already had on her computer, probably on her desktop or somewhere local, the same file that was working fine before her MS Office upgrade. She can still open the file and see all the data and many of the buttons still work, just not anything with VBA.

  4. #4
    cjl8on is offline Novice
    Windows 10 Access 2016
    Join Date
    Feb 2025
    Posts
    3
    I've done some more googling and I am thinking it might be Active X Settings. The behavior is similar to when that Security Warning comes up with the "Enable Content" button. If only had access to adjust the Trust Center settings. Stupid enterprise policies!!

  5. #5
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,939
    A accdb file that has been opened and run with 32bit access will not subsequently execute properly when opened in 64bit and visa versa. Not sure of the exact reason why but something to do with settings being created. I had the issue when playing around with the new northwind

    suggest provide a new front end or perhaps try decompile/recompile in 64bit then compact/repair.

    another option to try, on the users machine create a new empty db then import all the objects from the old db - do it in order tables, then queries, the modules/macros and finally forms then reports

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 04-02-2020, 11:56 AM
  2. Replies: 3
    Last Post: 09-26-2016, 06:28 PM
  3. RunSQL vs. QueryDef.Execute vs. CurrentDB.Execute
    By caubetiep1337 in forum Queries
    Replies: 8
    Last Post: 12-16-2015, 05:35 PM
  4. Replies: 10
    Last Post: 02-27-2015, 11:28 AM
  5. vba code help - Currentdb.execute
    By joycesolomon in forum Programming
    Replies: 5
    Last Post: 08-11-2014, 11:25 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums