Results 1 to 11 of 11
  1. #1
    usertest is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Oct 2023
    Posts
    35

    Question Avoiding reloading of forms again and again

    Hello,
    I have a dashboard that has multiple forms (4-5) that load when the dashboard is clicked.
    So when I open the form 1, it closes the dashboard and opens a new form in a new tab.
    Now when I exit the form 1, the logic behind is to again open the dashboard. But each time I navigate back to the dashboard, all the loading of 4-5 forms happen again.
    How can i avoid reloading the dashboard again and again.

    I believe we can set a global variable that can maintain the state. But don't exactly know how to code that.

    Does anyone know how to proceed on that and can share any code snippets?



    Thanks!

  2. #2
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,801
    By "tab" I'm going to assume your forms are loaded in tab view - not that they are forms on navigation form tabs.
    Hide the dashboard form, don't close it. Unhide when form1 closes.

    EDIT - right after posting that, I concluded that it probably doesn't matter about the tabs.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  3. #3
    davegri's Avatar
    davegri is offline Excess Access
    Windows 11 Access 2019
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,413
    If the switchboard and 4-5 forms are truly independent freestanding forms, code to load a form that is already loaded will be ignored by Access. Prove it by adding a temporary messagebox in the form load event.

  4. #4
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,801
    code to load a form that is already loaded will be ignored by Access
    Except that the forms are not open?
    I have a dashboard that has multiple forms (4-5) that load when the dashboard is clicked.
    So when I open the form 1, it closes the dashboard
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  5. #5
    davegri's Avatar
    davegri is offline Excess Access
    Windows 11 Access 2019
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,413
    @Micron - how can a form not be open when it is loaded? Perhaps you missed my condition that the forms be independent and freestanding (not subforms or contained within a tab on a main form).
    The intent of the messagebox was to indicate that the form would display the messagebox if the form actually loaded, but would not display if a repeat load was attempted.

  6. #6
    Minty is offline VIP
    Windows 10 Office 365
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,003
    Rather than close the dashboard, hide it?
    Then unhide it when returning to it.
    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 ↓↓

  7. #7
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,801
    how can a form not be open when it is loaded?
    I don't think I said that, which is why I quoted the OP. If the forms are on tabs on some dashboard form, then when that form is closed they are no longer open, right? So my comment about tabs not mattering really isn't correct. It does matter if we're going to have different notions of what the design is. It would help if OP clarifies things.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  8. #8
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,801
    Quote Originally Posted by Minty View Post
    Rather than close the dashboard, hide it?
    Then unhide it when returning to it.
    As stated in post 2?
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  9. #9
    Minty is offline VIP
    Windows 10 Office 365
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,003
    Quote Originally Posted by Micron View Post
    As stated in post 2?
    Pass me the white stick please.
    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 ↓↓

  10. #10
    usertest is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Oct 2023
    Posts
    35
    So when I open the dashboard, I have multiple forms and each form has a button to "assign/allocate" and once you click on that assign button, it closes the dashboard and open a new form.
    Now, there is a button on the new form called "exit".
    Once you click on the exit button, it reloads the dashboard again.

    So each time the dashboard loads, all the 4-5 forms are loaded back again which basically is running SQL queries on the backend.

    How can i avoid reloading the forms on the dashboard again and again whenever the user clicks on "exit" button


    Quote Originally Posted by Micron View Post
    I don't think I said that, which is why I quoted the OP. If the forms are on tabs on some dashboard form, then when that form is closed they are no longer open, right? So my comment about tabs not mattering really isn't correct. It does matter if we're going to have different notions of what the design is. It would help if OP clarifies things.

  11. #11
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,801
    How can i avoid reloading the forms on the dashboard again and again
    That has been answered twice already. Don't close - hide and unhide.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

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

Similar Threads

  1. Reloading table in Access.
    By JoshuaEir in forum Access
    Replies: 3
    Last Post: 03-05-2015, 01:14 PM
  2. Some form buttons disabled after reloading PC
    By spreadpgmr in forum Forms
    Replies: 2
    Last Post: 10-22-2014, 02:21 PM
  3. Replies: 5
    Last Post: 11-06-2013, 10:20 AM
  4. Replies: 0
    Last Post: 10-28-2012, 12:20 PM
  5. Disabling textbox on reloading the form
    By accesscoder in forum Forms
    Replies: 3
    Last Post: 10-16-2010, 05:55 PM

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