Results 1 to 6 of 6
  1. #1
    DC CS is offline Advanced Beginner
    Windows 11 Office 365
    Join Date
    Jan 2023
    Location
    Vaalpark, South Africa
    Posts
    84

    MS Access take forever to execute

    Hi all,


    I have just replaced my old laptop with a new one.
    Whenever I execute (Press F5) to run the program, access takes about 1 minute to execute the code.
    For example, I have a login form. The form is displayed immediately. I enter the credentials (username and password). When clicking the "Login" button, Access takes about 1 minute before the main screen is opened.
    All the tables, forms, etc. is on my local disc and not running over a network.

    I am using Access 365 and I have loaded all the updates and fixes I could lay my hands on.

    Any advise will be appreciated.

    Thanks

    Deon

  2. #2
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,574
    I am using Access 365 and I have loaded all the updates and fixes I could lay my hands on.
    With 365, that is not always the best idea. Various updates over the last few months have cause serious issues.
    Is the DB in a trusted location?
    Is your A/V scanning the file?
    Is everything the db uses in the same place?
    Do you have On Error Resume Next anywhere?

    Wlak through the code to see where the delay is.?
    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
    Minty is online now VIP
    Windows 10 Office 365
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,159
    +1 for Trusted location - It would be my first port of call.
    It can cause all manner of weird slowness.
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

  4. #4
    DC CS is offline Advanced Beginner
    Windows 11 Office 365
    Join Date
    Jan 2023
    Location
    Vaalpark, South Africa
    Posts
    84
    Hi,
    I did the walk through and came across the below code that takes some time:

    If RefExists = False Then
    References.AddFromFile Rst!reffilelocation & Rst!reffullfilename
    End If

    Could this be it?

    Thanks
    Deon

  5. #5
    DC CS is offline Advanced Beginner
    Windows 11 Office 365
    Join Date
    Jan 2023
    Location
    Vaalpark, South Africa
    Posts
    84
    Thanks all - I found the culprit. It has to do with the loading of the references.

    Problem fixed.

  6. #6
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,574
    Can you please show the code that sets refexists as loading references might be handy for others.
    In fact anything that is handling references.

    Thank you.
    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

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

Similar Threads

  1. Replies: 12
    Last Post: 11-03-2016, 09:22 AM
  2. Query takes forever and constantly refreshes
    By crimedog in forum Queries
    Replies: 5
    Last Post: 02-09-2016, 11:27 AM
  3. RunSQL vs. QueryDef.Execute vs. CurrentDB.Execute
    By caubetiep1337 in forum Queries
    Replies: 8
    Last Post: 12-16-2015, 05:35 PM
  4. Forever Enter Parameter Values
    By c.yyang in forum Access
    Replies: 2
    Last Post: 06-22-2013, 07:37 PM
  5. front end changes take forever
    By survivo01 in forum Programming
    Replies: 4
    Last Post: 04-19-2013, 01:26 PM

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