Results 1 to 9 of 9
  1. #1
    scott0_1 is offline Advanced Beginner
    Windows Vista Access 2013 32bit
    Join Date
    Apr 2018
    Posts
    82

    Multi user environments - do variables remain constant per user?

    End of day Friday and this occurs to me with a project I'm working on...



    I have one shared database and users cannot have their own front end due to IT policy.

    When the database opens, it creates a new record. It saves the primary key for that record in a global variable on the main form that stays open the entire time. The variable is gintID on frmMain. The user works through many forms, none of which are bound. They all use DAO recordsets to manipulate data. At the end of the process, when the user is done and they close the main form, the record is deleted.

    I have not tried this with multiple users using the database at the same time, but a potential problem popped into my head, and I'm not sure what the answer is.

    If I'm the user and gintID=10 when I log in, will that remain constant during my use? Or if Timmy in the cubicle opens the database and creates a new record that creates gintID=11, will that become my new gintID?

    I'm heading home for the weekend, but I will lose sleep over this. I don't know why!

    If you can answer my question, that would be great... Or if you can recommend an even better solution, I'd take that!

    Thanks for your help,

    Scott

  2. #2
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,791
    I know that when sharing fe, any records, temporary or not are exposed to all users, so I don't see why a public variable would not be. Obviously you don't want to hear about how this db is going to corrupt at some point because it's not split, so the banality of this is that whatever "fix" you employ, it won't last. At some point the db WILL corrupt and no telling when or what will be affected.

    IMHO, you need to push back. Read up on split vs not split dbs and grab all the info you can find and present it to your boss, who then needs to rag on the IT gods (or their boss) and make it happen. The alternative is to pay you to develop and maintain something that is doomed to fail at some point. You might want to keep the email where you present your findings so that you can refer back to it if they say you did a crappy job.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  3. #3
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    I agree with pushing back; this is ignorance on their part. The front end will corrupt sooner or later, and may take the back end with it. If they don't want files on each computer, put separate front ends for each user in folders on the server or something like that.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  4. #4
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    Running a multi-user database without each user having a copy of the front end on their machine is, indeed, a tried and true method of creating all kinds of problems, including timing problems, record-locking problems and major, major data corruption!

    The fact that some users report having had multi-user, non-split DBs running successfully for some time is totally meaningless! I've seen reports of such apps running smoothly for as long as 14 years and then bombing out! And once trouble starts it never stops! All it apparently takes is some combination of events to occur and BOOM!

    It's not a question of will the app become corrupt, but rather of when will it become corrupt. And once this type of corruption starts it will occur over and over and over again, until the app is split!

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  5. #5
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,722
    I agree with the other responders. You are headed for corruption when you have multi-users sharing a front end with MS Access.
    It is time for IT Policy to understand that the standard operating procedure for multi-user MS Access is a split database with common back-end and each user to have his/her own copy of the front-end on their own PC or equivalent (Citrix etc).

    There are several posts on this subject in forums. Here is a link to an article on MS Access Splitting and multi-user by FMS.

    Good luck

  6. #6
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,412
    from how you describe the process, even if each user does have their own front end (and I'm with everyone else on the requirement), I can see potential issues based on how you are creating GINT - user a opens the db, GINT 10 is created and read - how is it read? dlookup or similar? then when the user closes the db, GINT 10 is deleted as an individual records? or (since the implication is this is a 1 record table) all records are deleted? What happens if there is a power cut so the user cannot delete the record - is there a process to delete it when next opened?

    I also note you say shared db - no indication the db is split other than saying 'users cannot have their own front end' - which again is a must.

  7. #7
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    Do users have their own install of Word and Excel and other end-user apps? IT needs to understand that Access frontend (or VB.net or whatever is used for frontend GUI to backend data) is an end-user app and should be installed on each user workstation for best performance. Running copy from a folder on server should work but performance could be impacted.

    Suggest you conduct a test and find out what happens to gintID with simultaneous users.

    I agree splitting db is best when there are multiple simultaneous users. I did develop one non-split db with multiple simultaneous users (user decision contrary to my admonitions) which has worked but there is absolutely no code, not even macros. Very simple very small db.
    Last edited by June7; 01-26-2019 at 06:43 PM.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  8. #8
    scott0_1 is offline Advanced Beginner
    Windows Vista Access 2013 32bit
    Join Date
    Apr 2018
    Posts
    82
    Thanks for the advice everyone. Split the DB! Now it's a matter of distributing the front-end to everyone and keep it up-to-date. Harder than it sounds, believe it or not!!!!

    I marked the thread solved, but I'm still not 100% sure of the original question... I'm about 99% sure that on a shared front-end, the variable will change for everyone already using it. Splitting and distributing the front-end will solve it though!

  9. #9
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Quote Originally Posted by scott0_1 View Post
    TNow it's a matter of distributing the front-end to everyone and keep it up-to-date. Harder than it sounds, believe it or not!!!!
    Might be easier than you think. Most of us use some sort of automated updater. Can be a batch file, VBS script, etc. Basically the user runs the updater, not your app. The updater copies the app from a network location and then starts it. More sophisticated versions only copy the front end if it's changed, create folders, etc. Not on my computer right now so can't find an example, but search on "front end updater" and you'll probably find some ideas.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 6
    Last Post: 10-21-2014, 08:45 AM
  2. Replies: 0
    Last Post: 10-07-2013, 09:37 AM
  3. Replies: 8
    Last Post: 09-19-2013, 06:22 AM
  4. Replies: 3
    Last Post: 09-22-2011, 03:35 PM
  5. Using user inputs as variables in a query/report?
    By cheese9799 in forum Reports
    Replies: 3
    Last Post: 03-01-2011, 11:30 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