go to specified record vba

vsk1975

Registered User.
Local time
Tomorrow, 00:30
Joined
Mar 28, 2018
Messages
15
sir is there any vba code to display the specified record in the access form according to the id number that i entered (eg. 1 represents first record 2 for second etc..)
 
Hi. That depends. There is no inherent sort order for the data in a table. However, if you use a query, you can specify how the records should be ordered, so you can tell which record is the first and which one is the second.
 
If field name is ID then and you enter that number in textbox1 then the code is

me.recordset.findfirst "ID = " & me.textbox1
 
vba also has a function called gotorecord which is part of the docmd object I believe. you can see it through intellisense
 

Users who are viewing this thread

Back
Top Bottom