I'm trying to figure out a way of adding a row count to a query that adds a sequential row number for each change in a subsequent field.
For example, let says I have a table of values where the employee ID is the main lookup value. That value is linked to a dependent to determine who the dependent is. I'm making a table with this data that lists the employee's number followed by the dependent's ID number. I want the dependent's to become numbered, 1,2,3, and etc until the employee's ID number changes. I then want the counter to reset. Is there a way that I can accomplish this?
Here is an example of what I am looking for...
Employee_ID Dependent_ID Dep_Num
ABC123 321zax 1
ABC123 221zax 2
ABC123 721zax 3
GHI555 899tti 1
Does anyone know how I can accomplish this?