syntax error missing operator 3077

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am receiving the run-time error when i go delete one field and go to
anoher. i have 3 text boxes that i use to search a table and i use the
flowing code:

Sub Combo42_AfterUpdate()
' Find the record that matches the control.
Me.RecordsetClone.FindFirst "[PROPERTY_ID] = " & Me![Combo42]
Me.Bookmark = Me.RecordsetClone.Bookmark
End Sub

it works most of the time but like i said earlier when i delete one field
(property ID) and i click on another search field (serial number) it gives me
the run-time error. Is there something wrong with the code??
 
I am receiving the run-time error when i go delete one field and go to
anoher. i have 3 text boxes that i use to search a table and i use the
flowing code:

Sub Combo42_AfterUpdate()
' Find the record that matches the control.
Me.RecordsetClone.FindFirst "[PROPERTY_ID] = " & Me![Combo42]
Me.Bookmark = Me.RecordsetClone.Bookmark
End Sub

it works most of the time but like i said earlier when i delete one field
(property ID) and i click on another search field (serial number) it gives me
the run-time error. Is there something wrong with the code??

it tries to find the value in combo42 and this value is deleted,
therefore it doesn't find it and goes to EOF

EOF is not a valid bookmark therefore:

with Me.RecordsetClone
.FindFirst "[PROPERTY_ID] = " & Me![Combo42]
if not .nomatch then Me.Bookmark = .Bookmark
end with
 

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

Similar Threads

Run time error 3077 1
LIKE search help needed 3
Error 3077 6
Error 3077 Recordset.FindFirst using dates 2
Run Time error 3077 3
runtime error 3077 4
RecordSet.FindFirst 2
How to work with data containing ' ? 2

Back
Top