Yes you can do this, however there should be some other criteria that
you search on. It would probably be quite simple if you had just 5,
10, or even 25 records if they were being used all the time people
would get to remember them. However this learning curve is not really
necessary and should be avoided if you want people to accept your
software. Search on name, or size or colour or what is made out of or
anything more descriptive than a number.
Also when (if) your db gets used imagine if it had 2000 records or
20000 you can't ask people to remember a number that big!
Record numbers are Like Santa Claus. We all love them, but they don't exist
in Access. The record number you see is only a relatvie number based on the
current ordering and filtering of a recordset.
The best way to allow the user to select a specific record is by using a
combo box and a little code based on the primary key or another field were
the value of the field will be unique. For performance purposes, this field
should be indexed.
Create a combo box with a query based on the recordset and field you want to
use:
SELECT SSN From tblMembers;
Then in the After Update event of the combo:
Dim rst As Recordset
Set rst = Me.RecordsetClone
rst.FindFirst "SSN = '" & Me.cboSSN
If rst.NoMatch Then
MsgBox "No Match Found for " & Me.cboSSN, vbCritial, "Data Error"
Else
Me.Bookmark = rst.Bookmark
End If
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.