Run Time error 3077

  • Thread starter Joe via AccessMonster.com
  • Start date
J

Joe via AccessMonster.com

I have an access 2003 database that has a combo box on a form. It was working
for the past two days, but today it is giving me the Runtime Error 3077 when
I search for a record in the list. Can you please help me out. Below is the
error code.

Private Sub Combo15_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object

Set rs = Me.Recordset.Clone
rs.FindFirst "[University/Hospital] = '" & Me![Combo15] & "'"
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub

Thank You.
 
K

Klatuu

There are a number of problems with your code.
Try using this version:

Private Sub Combo15_AfterUpdate()
' Find the record that matches the control.

With Me.RecordsetClone
.FindFirst "[University/Hospital] = """ & Me![Combo15] & """"
If Not .NoMatch Then
Me.Bookmark = .Bookmark
End If
End With
End Sub
 

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