I'm getting a run time error saying that the database is locked by the Admin on my machine, which is me. How do I allow the current database be opened and updated?
Private Sub cmd_Execute_Click()
Dim dbs As DAO.Database
Dim Form_Number_Insert As String
Dim State_Insert As String
Dim x As Integer
Set dbs = OpenDatabase("c:\documents and settings\cmartin\my documents\jeff\document management\Document Inventory Database v1-0.mdb")
For x = 1 To 5
Form_Number_Insert = lbl_Form_Number.Caption
State_Insert = "AZ"
If chk_x = True Then
dbs.Execute "INSERT INTO tbl_Form_State (Form_Number,State_ID) VALUES (Form_Number_Insert,State_Insert);"
End If
Next
dbs.Close
End Sub
I'm getting the error on the opendatabase method
Ciaran
Private Sub cmd_Execute_Click()
Dim dbs As DAO.Database
Dim Form_Number_Insert As String
Dim State_Insert As String
Dim x As Integer
Set dbs = OpenDatabase("c:\documents and settings\cmartin\my documents\jeff\document management\Document Inventory Database v1-0.mdb")
For x = 1 To 5
Form_Number_Insert = lbl_Form_Number.Caption
State_Insert = "AZ"
If chk_x = True Then
dbs.Execute "INSERT INTO tbl_Form_State (Form_Number,State_ID) VALUES (Form_Number_Insert,State_Insert);"
End If
Next
dbs.Close
End Sub
I'm getting the error on the opendatabase method
Ciaran