Search for records in a form via combo box

stevepain

Registered User.
Local time
Today, 18:56
Joined
May 15, 2006
Messages
12
Dear all,

I'm trying to incorporate a combo box in my form to navigate through records. The plan is to select a piece of equipment listed in the combobox, and that record will then be displayed as an "after update" action.

However, I have tried through coding I have tried before and utilising the wizard to create this combo-box, but each time I get a "Complie Error - Can't find project or library".

The section of code is shown below:

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

Set rs = Me.Recordset.Clone
rs.FindFirst "[EquipmentID] = " & Str(Nz(Me![Combo227], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub

Any help gratefully received!

Thanks,

Steve
 
Try...

Code:
Private Sub Combo227_AfterUpdate()
  Me.Recordset.Findfirst "EquipmentID = " & Me.Combo227
End Sub
 
Thanks

Thanks Lagbolt - works a treat - think i was trying to overcomplicate things!

Always the way!
 

Users who are viewing this thread

Back
Top Bottom