run-time error '3734'

  • Thread starter DJ McNeill via AccessMonster.com
  • Start date
D

DJ McNeill via AccessMonster.com

Help... this so frustrating...

I have searched for answer to this problem but haven't found the solution.

I get a run-time error '3734' The database has been placed in a state by
user 'Admin' on machine X that prevents it from being opened or locked.

I have a simple form that is going to get more complicated if I can get the
basics to work. Currently I have a blank form with 2 unbound controls. I
bound the one control (combo drop down) to some sql that grabs data from a
query. Then on the event after update I want it to populate the text box
with some other data in the lookup query for reference. I couldn't figure
out how to do it automatically so I coded as follows:

Private Sub niceloc_combo_Change()
Dim Msg, Style, Title, Help, Ctxt, Response, MyString
Dim myquery As String
Dim mylistquery As Recordset
Dim DB As Database

If IsNull(niceloc_combo.Value) Then
Response = MsgBox(Msg, Style, Title, "", "")
If Response = vbYes Then ' User chose Yes.
MyString = "Yes" ' Perform some action.
Else ' User chose No.
MyString = "No" ' Perform some action.
End If
End If

myquery = "SELECT [Nice Locations].AFE FROM [Nice Locations] WHERE [Nice
Locations].[Nice Location] = '" & niceloc_combo.Value & "'; "

'Set DB = OpenDatabase("O:\bits\as\chap\Capital Equipment Tracking\CETSDB.
mdb")
'Set mylistquery = DB.OpenRecordset(myquery, dbOpenSnapshot)

'This was a second attempt the one above gave the same error.
Set mylistquery = CurrentDb.OpenRecordset(myquery, dbOpenSnapshot)


mylistquery.MoveLast

If mylistquery.RecordCount > 0 Then
Afe_text.Value = mylistquery.Fields("AFE")
End If
mylistquery.Close


End Sub



Please someone enlighten me.

Thanks,

DJ McNeill
 
D

DJ McNeill via AccessMonster.com

Note: developing the application no users (single person)
Access 2003, XP Pro
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top