Link to home
Create AccountLog in
Avatar of johnmadigan
johnmadiganFlag for United States of America

asked on

ms access query to group of sequential number in table

I have a table with ID, Locations, CountNum fields.  The table has data in the ID and Locations fields.

I would like to run and query to enter the value 1 in the first 3 records then the number 2 in the next 3 records etc. into the CountNum field.

Not sure the best way to do this?

Any suggestions?

Thanks for your help.
Avatar of peter57r
peter57r
Flag of United Kingdom of Great Britain and Northern Ireland image

How many records?
Avatar of johnmadigan

ASKER

I have 107 records.  currently should stay that way but could change if they add some more locations to count down the road.
Is the ID an incremental number for every record?
ID      CountNum
1         1
2         1
3         1
4         2
5         2
6         2
7         3
8         3
9         3
10       4   etc.
ASKER CERTIFIED SOLUTION
Avatar of Sharath S
Sharath S
Flag of United States of America image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer