Results 1 to 5 of 5
  1. #1
    AKQTS is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Jul 2010
    Posts
    56

    Check if file is locked

    I am running an auto print program from access. Multiple users can access the program at one time, but the auto print program (label matrix (.qdf)) cannot support mutliple users having the same printing file open. Solution=check if file locked and then don't open form.



    Would anyone have any boiler plate code for checking if a file is locked?

    I have tried a few exerts I have found online to no avail and will post those the next time I get to the computer with the program on it.

    Thanks

  2. #2
    NTC is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2009
    Posts
    2,392
    it strikes me as relatively straight forward to add a flag field to the appropriate table - that would be checked yes automatically when an Access user initiates the print. As you are an advanced beginner I trust you get the jist of this....simply checking a yes/no field at the appropriate event.

    and then develop a method to prevent another user from send to print this same record...

    the hard part is knowing when to clear this field out. its not really an Access question since the signal would have to come from that 3rd party software. that could be tough..... perhaps you can instead use either a time-out, or perhaps the user's log out or someother way to generically remove that flag value.

    not sure this helps.....

  3. #3
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    also try:

    http://support.microsoft.com/kb/209189

    if the file ext is QDF, don't know how that would work. but if it's sitting in a win directory, it should have the same properties as any other file in windows. If it doesn't, then these would work better I would think:

    http://www.google.com/#sclient=psy&h...w=1024&bih=681

  4. #4
    AKQTS is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Jul 2010
    Posts
    56
    Thanks, I am going to try to experiment with both suggestions this afternoon.

  5. #5
    AKQTS is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Jul 2010
    Posts
    56
    Due to other operations, I am just going to make the file always open exclusive.

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

Similar Threads

  1. I've somehow locked myself out
    By Rapunzel in forum Security
    Replies: 2
    Last Post: 07-25-2011, 02:10 PM
  2. folder locked after attaching a file
    By jimg972 in forum Access
    Replies: 0
    Last Post: 05-25-2011, 06:21 PM
  3. Check for existance of a file
    By jgelpi16 in forum Programming
    Replies: 1
    Last Post: 11-09-2010, 10:06 AM
  4. Replies: 10
    Last Post: 09-27-2010, 07:27 AM
  5. Replies: 1
    Last Post: 02-12-2010, 01:45 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