How can I find a specific record in my recordset?
Posted on 2003-03-02
I have a combobox on one of my forms that contains a series of transaction numbers. When the user selects one of these numbers I want my program to go to the corresponding record and show the results on my form.
I am able to find the record in the database and show the result but my recordset is reduced to one record (the one I found).
This is my code, activated once an item is selected from the combobox:
Set mrst = mdbs.OpenRecordset("select * from tblTable where FieldName = '" & cboTransNum.Text & "'")
What I want my program to do is go to the record in my recordset (for example record 20 of 100) instead of finding the matching record and limiting my recordset to one record.
This way I can use my existing functions for (update, next record, new record etc.)
Any help would be greatly appreciated.