Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Access 2010 Test Lock File

Posted on 2015-02-12
5
193 Views
Last Modified: 2016-02-10
Hi Experts,
I have multiple Users of an Access Application using their laptops in their homes to manage data located in a Back End Database (BEDB) in Dropbox.  Due to the way Dropbox works, if more than one User accesses the data base at a time updates are not processed correctly.

To manage this I want to stop more than one User connecting at a time.  My idea is for the application to check if someone is currently using it and if so advise them so they don't connect.

When a User starts up the application it doesn't immediately connect to the BEDB.  I would like the application to:
- Test to see if a file exists in the BEDB Folder and if it does display a message. to the User.
- If the file doesn't exist I want to create one.

How do I?
- Test for the existence of a specific file.  e.g. Open.txt
- Create the file 'Open.txt' if it doesn't exit.

PS:  If there is a better solution to achieving this I'd like to hear about it.

Thanks.
Bob C.
0
Comment
Question by:Bob_Collison
  • 3
5 Comments
 
LVL 57

Accepted Solution

by:
Jim Dettman (Microsoft MVP/ EE MVE) earned 500 total points
ID: 40605741
Bob,

 Normally one uses Dir() in VBA to check for a file, or the file system object.

 As for creating a file, you would use the OPEN statement in VBA and KILL to delete it.

What your thinking is probably best as it doesn't use a database.

I was going to suggest this:

Resource locking in your applications
http://www.experts-exchange.com/Database/MS_Access/A_5328-Resource-locking-in-your-applications.html

 as locking users out of a process, module, or even the app is one of the things I talk about, but that all relies on access to a table and DB, which won't work on the drop box setup.

Jim.
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 40606437
...Jim,
Might SharePoint be a better option in this case?
0
 

Author Comment

by:Bob_Collison
ID: 40606482
Hi Jeffery,
The ability to use a SharePoint Server is not available to us.  we are  small non-profit organization so 'paying' for a service is not viable.

Thanks for the suggestion though.
Bob C.
0
 

Author Comment

by:Bob_Collison
ID: 40606717
Hi Jim,
As part of this process I currently click a button on Form A that opens Form B and closes Form A.  Form A doesn't access a Database but form B does.  Eventually I close Form B and open Form A again.

I would like to 'hide' Form A instead of closing it when I open Form B which will allow me to pass data between an unbound field on Form A and then 'un-hide' Form A when I close Form B.

I don't know the syntax to 'hide' and 'un-hide' Form A (assuming it can be done)  There isn't a .visible Property for a Form Object.

Thanks.
Bob C.
0
 

Author Closing Comment

by:Bob_Collison
ID: 40608595
Thanks for the information.
0

Featured Post

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Each year, investment in cloud platforms grows more than 20% (https://www.immun.io/hubfs/Immunio_2016/Content/Marketing/Cloud-Security-Report-2016.pdf?submissionGuid=a8d80a00-6fee-4b85-81db-a4e28f681762) as an increasing number of companies begin to…
It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question