Three easy ways to jump to a record in a combobox but still be able to scroll through all the other records The techniques can be used in ways other than a Combo box:
1) The combo box and list box wizard will do this for you automatically. In the first or second step (depending on you version of Access), choose the third option: "Find a record on my form based on the value selected in my combo box" This must be done on a BOUND form.
2) Have the record ID number as one of the fields in the list/combo box and in the form (they can both be hidden). The bound column of the list/combo box is the record ID field. Then the On After Update Event of the list/combo box would look like:
Private Sub List/ComboBoxName_AfterUpd
txtRecordID.SetFocus 'Use the name of your text box
DoCmd.FindRecord List/ComboBoxName 'Use the name of your list/combo box
End Sub
3) Again, the bound column of the list/combo box is the record ID field.
Private Sub List/ComboBoxName_AfterUpd
Me.RecordSet.FindFirst "txtRecordID = " & List/ComboBoxName 'Use the name of your list/combo box and text box
End Sub
Two easy ways to filter the records to show only the record selected:
1) With the bound column of the list/combo box is the record ID field.
Private Sub List/ComboBoxName_AfterUpd
Me.Filter = "txtRecordID = " & List/ComboBoxName 'Use the name of your list/combo box and text box
Me.FilterOn = True
End Sub
2) Again, the bound column of the list/combo box is the record ID field.
In the query that is the record source for the form, create a criteria like this:
[Forms].[YourFormName].[Co
Additional information:
http://support.microsoft.c
http://allenbrowne.com/ser
http://www.rogersaccesslib
Main Topics
Browse All Topics





by: peter57rPosted on 2009-11-06 at 10:11:28ID: 25761480
For Findfirst you have to do something like...
rs.findfirst "fieldname= " & value
So if your field is called SerialNumber then..
rs.findfirst "SerialNumber= " & value
I don't know where you are getting the value from that you want to match to.
I'm not clear what you are trying to do with the bookmark. Once you have used findfirst and found a match then the recordset is positioned on that record.