Page 2 of 2 FirstFirst 12
Results 16 to 25 of 25
  1. #16
    Join Date
    Apr 2017
    Posts
    1,792
    Quote Originally Posted by Micron View Post
    I've never heard of anyone using multiple BE's. How on earth would you sync them?
    I have used them as data sources for different apps. E.g. a calendary DB, or the DB of all countries with country codes, names, etc.


    I would not put queries in the back end as a general rule.
    You will if you use SQL Server DB as BE. Honestly, MS Access SQL is a woefull thing really!

  2. #17
    Micron is offline Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,422
    I have used them as data sources for different apps.
    Then they''re not really back ends if you're not adding/editing data through the FE - they're libraries?
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  3. #18
    orange's Avatar
    orange is offline Moderator
    Windows 10 Office 365
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    Multiple BEs is/was quite common. Each BE had different data or data in a different status eg Prod/Maint/Test/Dev
    I often had Access BE and 1 or more Oracle BE, even a MySQL BE.

    Based on the OP's posts it seems to me he has misunderstood proper usage of individual copies of FE for each user that can talk to a common BE(s) - As ArviLaanemets points out in post #14.

  4. #19
    Micron is offline Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,422
    Multiple BEs is/was quite common. Each BE had different data or data in a different status eg Prod/Maint/Test/Dev
    Seems I need to clarify, but I thought syncing comment would have sufficed.
    I meant multiple copies of the same tables used for appending/editing the same data sets. I guess that is not what was originally meant.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  5. #20
    Alocin is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Jun 2020
    Posts
    15
    Thank you everyone for all of your thoughts.
    Just FYI and I am not trying to be funny but we have a single FE for all users to use.
    We have been using this only one FE shared on a network drive for a little over 20 years with I guess much luck.
    We have not had any problems. Thank you for the concerns but this has been my experience.

    So to be sure I have answered the question: "Each user has their own copy of the FE on their individual PC as CJ has mentioned in #10"? The answer is no. We only have a single FE for all users to share.
    The next information I want to clear up is that the five BEs DON'T have ANY queries or forms or reports or modules or etc. These BEs only have tables that the single FE is linked to for its use. Also, I have been using "Record Lock" in "Edited Record" mode with page locking. I guess it has prevented disastrous corruptions.

    Please note that I am asking for your support on whether there is a way to prevent another user opening a form that is already opened by someone else. Anyhow, if anyone can suggest a VBA script to detect an open form PLEASE let me know.

    Thank you all so very much for all the support thus far.

    Ciao!
    Alocin

  6. #21
    davegri's Avatar
    davegri is offline Excess Access
    Windows 11 Access 2019
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,740
    I think the 2nd paragraph in post #10 is germane. It depends on how your users open the form where the code should be located.

  7. #22
    Micron is offline Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,422
    In my experience with single shared fe, each person creates an instance of a form when they open it with their own copy of Access, so no, there is no way to detect that anyone else has a form open. These instances have no awareness of each other. IMO the issue isn't really whether or not someone has the same form open. The issue is whether or not 2 simultaneously opened identical forms load the same records and edit the same set/page of records and whether or not record locking comes in to play
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  8. #23
    Join Date
    Apr 2017
    Posts
    1,792
    In addition to Micron's last post, when an user opens your FE, then really it creates the copy of this FE in memory of is/her computer (what we call the instance), or in memory of Terminal Server in case the user opened the FE from there. All the work is done in user's computer. And when another user opens the same FE, another instance of this FE is created in memory of another computer. The only changes happening with FE itself is that the lock file is created in same directory (I haven't a clue what hapens with lock file when several users open the same FE though).

    As follows, to get any info which forms are open in another user's instance of same FE is to somehow have access to computer memory of all other users, and somehow to read this info from there!

  9. #24
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,929
    The only changes happening with FE itself is that the lock file is created in same directory
    not quite true, when you open the FE, the FE file is updated. To demonstrate, using explorer, navigate to a .accdb. Note the date modified value. Open the file - the date modified will change to the current time. May take a few seconds to update the time - will be faster if an object (form/report/etc) is opened.

    With regards the OP's situation, suspect just luck, over the years I've had 3 clients who shared the FE and came to me when it became corrupted. One used the same file for development as well and had no backups.

    And with regards the OP's question, the only way I can see it could be done would be to have a 'flag' table in the BE that is checked before opening the form, if the form is not flagged, add a flag and open the form. Then remove the flag when the form is closed. Flag table might contain form name, username and perhaps a timestamp.

    you could use dcount("8","tblFlags","formname='" & nameOfFormToOpen & "'")=0 to check if form is available

  10. #25
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,553
    @CJ_London

    Typo there I think? and for the benefit of the O/P
    Code:
    dcount("*","tblFlags","formname='" & nameOfFormToOpen & "'")=0
    
    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

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 13
    Last Post: 12-28-2016, 11:39 AM
  2. Replies: 2
    Last Post: 12-17-2013, 04:16 PM
  3. Replies: 3
    Last Post: 09-07-2012, 12:50 PM
  4. Replies: 7
    Last Post: 11-16-2011, 01:22 PM
  5. Prevent Users from Deleting Records
    By DocOrganizer in forum Access
    Replies: 15
    Last Post: 11-30-2010, 02:57 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