MS Access Row Number Using Queries can be easily performed within a query then bound it to a continuous form. However, you can use the below code to number the records of MS access forms:
SN: DCount("*","TableName","[ID]<=" & [ID])
First of all, when you build a query, create an expression and name it “SN”. Then, use the above formula to perform row numbering. Next, bound it to a continuous form. Consequently, it will show a serial number for each record. However, when you delete a record or add a new one, the sequence will be refreshed automatically. Of course, you will need to refresh the form after delete or or add a new records. However, when you perform Form Filtering, it will show you the original serial number of each record unchanged or exactly as the non-filtered form.
Anyway, if you still need to re-number the form records after filtering, we recommend you to see our post “MS Access Row Number On Continuous Form” as it loops through all records (filtered or not) and re-numbers the records in the original table. Consequently, it will show a sequence number for each record.
For better clarification on MS Access Row Number Using Queries, please download our example below:
For more pro MS Access Programs, please visit our home page here.
To use Microsoft Access Programs.
You’ll need to have Microsoft Office installed including the bundle of MS Access or to download the free Microsoft Access 2016 run-time.