troubleshooting Question

Numbering Data in a form Sequentially

JENNIFER NEWTONFlag for United States of America asked on
Microsoft Access
14 Comments3 Solutions154 ViewsLast Modified:
How do I automatically generate a sequential number sequence and assign it to the rows returned on a form?

I have a table with two columns.  The first column is a Work Order ID that's assigned to multiple samples.  The second column in the Sample ID.  I have a form that will search on Work Order and return the Sample ID's for that work order.  The Sample ID's are numbers, and thus can be sorted numerically.  I want the form to sort these Sample ID's numerically and then assign them the number they are in the sequence.



Example Table with Work Order and Sample ID

I would like the form to return the Sample ID's for Work Order ABC1925.  This would result in the Details section of the form returning:


I would then like to assign each Sample ID with the number they are on the current list.  So it would be:

1        15463
2        15464
3        15465
4        15466

If I closed the form and decided to search for another Work Order, I would want the form to assign the sequence for the new set.  So if I searched by Work Order LMN7643, it would return:

1        21015
2        21016
3        21025
4        21026
5        21032
6        21035

Note that the Sample ID's aren't sequential themselves.  That doesn't matter for my purposes.  I only want them numbered sequentially by descending Sample ID.

Thanks for everyone who read this, I hope you have a great day.
Join our community to see this answer!
Unlock 3 Answers and 14 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 3 Answers and 14 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros