Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Database Lock

Status
Not open for further replies.

darude

Programmer
Jun 23, 2003
138
US
Hi All,
I have an .mdb file. I open another .mdb file from within this .mdb file. Below is the code I use. Users are getting the error "The database has been placed in a state by user 'name' on machine 'machine name' that prevents it from being opened or locked". Does anyone have any suggestions? Thank you!!!

Sub OpenSecuredRolloverFile()
Dim myShell As String
Dim strAccessExe As String
Dim strMDB As String
Dim strMDW As String
Dim strUser As String
Dim strPassword As String


strAccessExe = "C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE"
strMDB = "F:\Databases_Shared\STCDashboard\Rollover_Appn.mdb"
strMDW = "F:\Databases_Shared\Pic\SecurityFile\BPIC_Secure.mdw"
strUser = CurrentUser()
strPassword = "boston"

myShell = Chr(34) & strAccessExe & Chr(34) & " " & _
Chr(34) & strMDB & Chr(34) & " /wrkgrp " & _
Chr(34) & strMDW & Chr(34) & " /user " & _
Chr(34) & strUser & Chr(34) & " /pwd " & _
Chr(34) & strPassword & Chr(34)


Shell myShell, vbMaximizedFocus

End Sub
 
Is the database split into a front end and back end? Is anyone doing any development (eg changing forms or code)? Have you ensured that everyone has full permissions on the directory or directories for the databases?

 
Yes, the back end is SQL Server. No one is changing any forms or code and everyone has full permissions on the directory.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top