Take the following as an example: 10,10,10,10,20,20,30,30,30,40,50....
These #s represent employee id# sorted numerically in ascending order in a query I maintain (QueryA). However, I would like to create command button with VBA code that would allow me to advance to the record which has the next sequence of numbers (i.e., 1st, 5th, 7th, 10th, 11th, etc.). I'd like it to be a Function. I believe I'd probably need a For Next Statement, RecordCount, and a GoTo statement but I don't know how. If there is an easier way than this, please let me know... Thanks.
These #s represent employee id# sorted numerically in ascending order in a query I maintain (QueryA). However, I would like to create command button with VBA code that would allow me to advance to the record which has the next sequence of numbers (i.e., 1st, 5th, 7th, 10th, 11th, etc.). I'd like it to be a Function. I believe I'd probably need a For Next Statement, RecordCount, and a GoTo statement but I don't know how. If there is an easier way than this, please let me know... Thanks.