Results 1 to 14 of 14
  1. #1
    santon's Avatar
    santon is offline Advanced Beginner
    Windows 10 Office 365
    Join Date
    Dec 2020
    Posts
    44

    Slow loading form

    Hello, my problem is I have a form which takes forever to load.
    Whole database loads quickly, all forms also, except this one. tried to copy it and then delete some of the controls (access analyzed and said "fewer controls"),
    I've tried deleting all the buttons, all macros, I've got to the point where I deleted everything in the form, left only white background, and it is still slow on loading.

    Also, I noticed when I open the database, then click on that form, it is the only one that takes too much time to load, but after that slow first load, if you close it (form) and then open again it loads much quicker.
    I repeat, that is the only one form that is slow in whole database and I want to know the reason why, so if maybe I can fix something instead of creating everything all over again from scratch.



    Also tried exporting that form to another database, didn't help.

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2016
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,742
    Perhaps posting a copy of the database with some sample data and instructions for showing the problem form would be helpful.

  3. #3
    Minty is online now VIP
    Windows 10 Office 365
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,003
    If you deleted everything and it was still slow then the form probably has a slow running query or huge table as it data source?
    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
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,570
    Try just recreating the Form
    You can PM me if you need further help.
    Good Reading https://docs.microsoft.com/en-gb/off...on-description

  5. #5
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,122
    I think you shold check the form's record source and any VBA code in the form's main events (Open\Load\Current).

    Cheers,
    Vlad
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  6. #6
    santon's Avatar
    santon is offline Advanced Beginner
    Windows 10 Office 365
    Join Date
    Dec 2020
    Posts
    44
    Hi, thank you all for your replies.
    Form doesn't have any code, query or huge table as record source.
    Form's record source is a table, which is record source for two forms (2 different parts of the machine in my factory), but there's barely any records in it.

    This is that form. It has macros for new record, saving record etc, it has combo boxes, text boxes, calculated fields, and on the right there are option groups.
    They are like some form of mini checklist for the material.

    Click image for larger version. 

Name:	template_1.JPG 
Views:	22 
Size:	167.1 KB 
ID:	43696

  7. #7
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,991
    Try creating a new form and importing the objects a few at a time to see what causes the delay.
    My guess is the huge number of radio buttons in the option groups on the right.
    You could try putting those in a subform.

    You also mentioned that the form is only slow to load the First time. Subsequent reloading is much faster.
    As its not your startup form try opening it hidden when you load your startup form (or using a autoexec macro).
    Then when you need to use it just open it normally. It should be instantaneous.
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  8. #8
    santon's Avatar
    santon is offline Advanced Beginner
    Windows 10 Office 365
    Join Date
    Dec 2020
    Posts
    44
    Quote Originally Posted by isladogs View Post
    Try creating a new form and importing the objects a few at a time to see what causes the delay.
    My guess is the huge number of radio buttons in the option groups on the right.
    You could try putting those in a subform.

    You also mentioned that the form is only slow to load the First time. Subsequent reloading is much faster.
    As its not your startup form try opening it hidden when you load your startup form (or using a autoexec macro).
    Then when you need to use it just open it normally. It should be instantaneous.
    I'll try that first part.

    About the second part and the autoexec, can you explain a little bit more?
    Is this a way to do it? Create a macro, rename it to autoexec, select form and set it to hidden?
    Because I've tried this and when I open my database again it is slow because it's loading that slow form

    Click image for larger version. 

Name:	Capture.JPG 
Views:	20 
Size:	22.1 KB 
ID:	43697

  9. #9
    davegri's Avatar
    davegri is offline Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,421
    My guess is the huge number of radio buttons in the option groups on the right.
    I thought so too, so I created a form to duplicate the radio button layout.

    It turns out that the buttons can't be in option groups because Access limits 20 buttons to a group.
    Be that as it may, I created the 180 buttons and put boxes around them to appear as shown.
    It loads fine and quickly. I added a form open event to iterate thru all the buttons and set them to True. That didn't slow down the load at all.

    I suspect that there must be some initialization code running that is gumming up the works.
    I'd make a copy of the form and remove all event procedures and embedded macros and control source calculations (one at a time) and see it that loads OK.

  10. #10
    santon's Avatar
    santon is offline Advanced Beginner
    Windows 10 Office 365
    Join Date
    Dec 2020
    Posts
    44
    Quote Originally Posted by davegri View Post
    I suspect that there must be some initialization code running that is gumming up the works.
    I'd make a copy of the form and remove all event procedures and embedded macros and control source calculations (one at a time) and see it that loads OK.
    I've already tried that. Copying, exporting to another database, didn't help.
    There is no code or macro in the form, only macro that was onload to maximize windows, but I've deleted it.
    Also deleted all calculated fields from the table and form, still nothing changes

  11. #11
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,991
    OK using the autoexec macro to open the problem form hidden was a bad idea.
    What you would need to do instead is load a different startup form then use a timer event with a short delay e.g Timer interval =2000 = 2 seconds to load the form as hidden...and then change the interval to 0 to disable the timer.
    It may of course prevent use of the visible form in that time period in which case scrap the idea completely.

    Thanks to davegri for testing the impact of the 180 radio buttons. Whilst I'm surprised at the result, it might be better to replace all of them with combos with values from 1-30.

    Anyway having read your responses, it now looks to be that you have one or more corrupted controls. You need to identify it and then replace it.
    I had to do this recently when a Web browser control got corrupted causing a form to hang for up to 30 seconds. After replacing it, the form loaded in a fraction of a second.
    My suggestion about importing the objects a few at a time or better still, one at a time, should allow you to deduce which control(s) is/are responsible in your case
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  12. #12
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,122
    You also mentioned combo boxes, start with those first, look at their row sources as they can slow down loading of the main form.

    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  13. #13
    santon's Avatar
    santon is offline Advanced Beginner
    Windows 10 Office 365
    Join Date
    Dec 2020
    Posts
    44
    Thank you all for your help, I've deleted the corrupted form and started creating a new one. Got tired of trying to find out what is wrong with the form for the last two days.

    New one loads very fast for now

    I want to set maximize window setting for my form on load, is it better (faster load) way macro or event procedure?

  14. #14
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,991
    Probably almost identical but I would use event procedures as they are more powerful - important if you want to do additional code
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

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

Similar Threads

  1. Slow .MDE file when loading forms
    By Cschmitt in forum Access
    Replies: 2
    Last Post: 07-22-2015, 09:14 AM
  2. Loading A Form
    By Robert2150 in forum Access
    Replies: 5
    Last Post: 06-24-2015, 01:38 PM
  3. Replies: 3
    Last Post: 07-11-2014, 08:13 AM
  4. Form Loading Slow From the Shared Folder
    By injanib in forum Forms
    Replies: 2
    Last Post: 06-25-2011, 03:45 AM
  5. Slow Access Loading time
    By alexstoker in forum Access
    Replies: 3
    Last Post: 02-05-2006, 08:55 AM

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