Solved

Access DB VBA Checks Front-End Location

Posted on 2014-03-19
3
649 Views
Last Modified: 2014-03-20
Experts,

I'm having issues with some of the users of a front end copy of a database opening it from the source directory on our network. Which is causing me issues when I want to update the front end DB. I was hoping that someone could provide some VBA that would:
1) check the database directory on open
2) if opened from source directory prompt the user to do a save as and most importantly
3) ensure that they do not save as on a network drive.

Any assistance with this would be very much appreciated.

Thank you
0
Comment
Question by:spaced45
3 Comments
 
LVL 49

Expert Comment

by:Gustav Brock
ID: 39941630
Make the network folder read-only for common users.
Or mark the file itself (open properties) as read-only. That should learn them from not opening the network copy of your file.

/gustav
0
 
LVL 47

Accepted Solution

by:
Dale Fye (Access MVP) earned 500 total points
ID: 39941852
From my iPad, so don't have access to my code, but in my splash form, I have a Timer event (timer interval = 100) that reads something like:

Private Sub OnTimer

    me.TimerInterval = 0

     if intsr(CurrentProject.path, "S:\") <> 0 then
          MsgBox "You cannot run the application from the network drive." & vbcrlf & vbcrlf _
                     & "Copy the file to your hard drive and try again!"
          docmd.quit
    end if

End Sub
0
 
LVL 1

Author Comment

by:spaced45
ID: 39943808
Worked fine. Thank yo.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Outlook Free & Paid Tools
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

808 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