In a DB There are many transactions of many students with unique student ID I need a VBA code by which I can get the transaction number (Index) of a selected Record of selected student from his all transactions.
You need it awkward? In a database, SQL is the native language.
But before thinking about a statement, you should know something about the structure of the table. (Many are not aware that not everyone can look over their shoulder.)
You display a form which includes the student, the relevant transactions, and the recordIDs of those transactions, you select a record, and then you have the recordID you want.
Here I need
When I select recodid 4; in a textbox it show "This is 3rd transaction of the student."as till recordid 4 the student whose id is 1 have 3 transactions.although his total transactions are four .