Results 1 to 7 of 7
  1. #1
    fishhead is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2015
    Posts
    167

    Keep a Connection Open to the Back End Database While Your Application Runs

    I have 2 backend .accdb files that are linked to my front end application.

    If there are no users other than me on the network the application works quite fast
    as soon as 1 or 2 users log in the speed reduces substantially. I'm certain this is not a network issue as i've beefed up our network substantially.

    Someone in this forum suggested (a while ago) that i should keep an open connection to the BE while the application runs. I also have this article explaining how to do this. https://www.fmsinc.com/microsoftacce...dDatabase.html

    The problem is i have limited knowledge on how to follow these instructions and need some help with this.
    Is there anyone in the group that would be willing to go through this with me?



    regards,

  2. #2
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,977
    All you need to do is have a small linked table open but hidden whilst the database is open.
    You could open that table (in the background) using your startup form or an autoexec macro.

    As you have 2 BE files, you need two tables kept open - one from each db

    If you have a settings table with one record (or a small number of records) that will be needed anyway, use that.
    If not create a new linked table which can serve as your open connection.
    That's it.

    EDIT:
    Just to confirm - each user need their own local copy of the FE on their own workstation
    Last edited by isladogs; 04-16-2019 at 09:15 AM. Reason: Clarification
    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

  3. #3
    fishhead is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2015
    Posts
    167
    thanks Colin, i'll try what you suggest with fingers crossed!

  4. #4
    fishhead is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2015
    Posts
    167
    HI Colin,
    i created a form that has the control source from both BE dbases and added it to the autoexec macro (hidden)as you suggest. this form has two subforms (one for accounts receivable and the other for accounts payable). the idea is when the user opens the main form it shows both the AR & AP for a file with a couple of extra fields calculating the profit and taxes etc.

    Normally this form takes a long while to open (again only when other users are on the network) and i suspect this is because the AP & AR tables each have +18000 records in them that need to be sorted by the invoice number. (meaning a specific invoice number may only produce 2 AR lines and 2 AP lines for example). This Query is what's taking the time to open (again only when others are on the network).

    Long story short having the new "dummy" form (that is linked to a query with both these tables )open hidden via the autoexec macro doesn't seem to make any difference in speed.
    Do you have any other suggestions i can try?

    tks

  5. #5
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,977
    I did say to use small tables. Ideally one field & one record. Maker sure it stays open (or in your case, both tables stay open)
    Once that is in place, open a query or form using another linked table(s). It should usually be faster but not always as other factors may be causing greater delays
    See e.g. https://stackoverflow.com/questions/...inked-database
    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

  6. #6
    fishhead is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2015
    Posts
    167
    HI Colin,
    i recreated a new form with a table from both BE dbases (each with only 1 record in the table as you suggested) . if there is any increase in speed it is not noticeable. The bottom left corner of the screen shows "....calculating...." during the lag.

    the new form is keeping both BE dbases open (again two tables each with one record each) and the "calculating" form has two BE tables each with +18,000 records to sort through before the FE application gets updated. Can you suggest anything else to try to speed things up? (reminder this only seems to be happening when others are on the network. If it's only me the FE application is nice and fast : )

    tks,

  7. #7
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,977
    There are many possible reasons for poor performance in a split database.
    I suggest you next try the DAO.OpenDatabase method in the FMS link you provided

    There are many other tips on both the FMS & Allen Browne's websites
    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. Replies: 1
    Last Post: 10-01-2015, 09:14 AM
  2. Replies: 9
    Last Post: 09-09-2015, 09:42 AM
  3. Replies: 2
    Last Post: 04-17-2013, 08:53 PM
  4. Replies: 2
    Last Post: 03-14-2013, 04:43 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