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
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