Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Newsgroup Archive
Access Newsgroups
Access General
Database locked when go into form design view
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="ES, post: 992275"] I had a discussion going on this yesterday but did not get it resolved. So I set up a testing db with one form, one command button, and one module. Also set the reference to Microsoft ActiveX Data Objects 2.7 Library. Can someone try this and let me know why the db is locked when the form goes to form view from design view. If I open the form straight into form view, it runs fine BUT if I go into design view I have to close the form then open in form view to get it to work again. Here is the Error: “The database has been placed in a state by user ‘Admin’ on machine ‘1233455…†that prevents it from being opened or locked†Here is all the code in the test db. Private Sub Command0_Click() ADO_Test End Sub Public Sub ADO_Test() Dim conn As ADODB.Connection Dim strConn As String Dim strSQL As String On Error GoTo ERRORCATCH 'Create the ADO Connection object Set conn = New ADODB.Connection 'Specify a valid connection string strConn = "Data Provider=Microsoft.Jet.OLEDB.4.0;" strConn = strConn & "Data Source = " & _ CurrentProject.Connection.ConnectionString conn.ConnectionString = strConn 'Specify the Data Shaping provider conn.Provider = "MSDataShape" 'Open the connection conn.Open MsgBox "connection open" conn.Close Set conn = Nothing MsgBox "connection closed" Exit Sub ERRORCATCH: If Err.Number = -2147217904 Then MsgBox "File format not correct, please check file.", vbOKOnly Err.Clear Else MsgBox "Unspecified data error. Please Check Database File for correct table strucure.", vbOKOnly Err.Clear End If End Sub [/QUOTE]
Verification
Post reply
Forums
Archive
Newsgroup Archive
Access Newsgroups
Access General
Database locked when go into form design view
Top