Results 1 to 12 of 12
  1. #1
    Dave_D's Avatar
    Dave_D is offline Advanced Beginner
    Windows 10 Access 2010 64bit
    Join Date
    Aug 2015
    Posts
    67

    Determine WHO has file open?

    Does anyone have any VBA code to determine WHO has the file open?

  2. #2
    Micron is online now Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,422
    I relied on logging in/out users via table records. If you drag the laccdb file into notepad (may result in gibberish) or Notepad++ and find that users are logged in as admin, that file won't help you much. Easy enough to get users via recordset or query when in a table. You might want to employ a log out routine if they leave the db idle for long periods of time.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  3. #3
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    laccdb file shows computer name. If you need to know a user name then maintain a login process. Review https://www.access-programmers.co.uk...2#post-1779515
    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.

  4. #4
    Micron is online now Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,422
    laccdb file shows computer name
    and it usually shows user as "admin"?
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  5. #5
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    Theres an app that tells you Whos In the Db.
    attached.
    Attached Files Attached Files

  6. #6
    Dave_D's Avatar
    Dave_D is offline Advanced Beginner
    Windows 10 Access 2010 64bit
    Join Date
    Aug 2015
    Posts
    67
    Sorry, I should have been more specific. Its determining who has an excel file open using Name Filepath As

  7. #7
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    What the heck is "Name Filepath As"?
    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
    Micron is online now Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,422
    Name is a vba statement. I suspect that you have seen it before?
    So " Name variable As SomePath" ?
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  9. #9
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Nope, not familiar with it. Guess I will learn something new.
    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.

  10. #10
    Micron is online now Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,422
    I was on my phone when I wrote that, so please excuse my brevity. For some reason I thought there was a long ago post about it where you were involved. Try?

    https://docs.microsoft.com/en-us/off...name-statement
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  11. #11
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Okay, that does tickle some vague recollection. Must have been quite a while ago. Also, the context it was mentioned in didn't help. Don't see how it relates to issue of determining who has an Excel file open.

    Dave, why do you think it is related?

    How would you think program on one computer could know what files another computer has open?
    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.

  12. #12
    Micron is online now Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,422
    This should have been in an Excel thread?
    Most of the code you'll find for knowing who has a file open is Excel based. That's probably because you can't share an Excel file, which is not an issue with Access. I'd say this could be solved by grabbing code posted by others in response to this issue. It's out there.
    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. Replies: 7
    Last Post: 08-14-2020, 06:55 PM
  2. Workbooks.Open won't open Excel file in Edit Mode
    By jeffhanner10@gmail.com in forum Programming
    Replies: 5
    Last Post: 02-15-2020, 11:51 AM
  3. Replies: 11
    Last Post: 01-07-2019, 05:46 PM
  4. Replies: 3
    Last Post: 05-27-2015, 01:17 PM
  5. Replies: 2
    Last Post: 05-26-2011, 12:15 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