find record and set active

coyne

Registered User.
Local time
Today, 05:12
Joined
Nov 6, 2002
Messages
14
Maybe someone can help me with this. I'm trying to do a search on a continuos form that will set the record Im searching for to active. I tried to use docmd.Findrecord but I couldn't get it to work, any Ideas.
I attached an example.

thanks
 

Attachments

Drop a combo on your form to select the record, then use the FindFirst method to put focus on the selected record.

'combo six has the records to find
Sub Combo6_AfterUpdate()
'find a record
Me.RecordsetClone.FindFirst "[ID] = " & Me![Combo6]
'if found which it will be because the combo has the same records as the form
Me.Bookmark = Me.RecordsetClone.Bookmark
'set focus to the appropriate field, in this case 'ID'
Me.ID.SetFocus
End Sub
 
I tried a variation of that and it didnt work. I dont want to use a comdo box because evetualy it might have a couple hundred records in it.

this is the code, it sets the text0 field active but just the first record, not the one that matches the dategoto text box.

Private Sub Command14_Click()
Me.RecordsetClone.FindFirst Me.Text0 = Me.dategoto
Me.Bookmark = Me.RecordsetClone.Bookmark
Me.Text0.SetFocus
End Sub


thanks
 

Users who are viewing this thread

Back
Top Bottom