Discussion Locked

Increments in Access

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I have a query of 5000 records with their correspondent fields, and I need to get them in an increment of every other 100, meaning I will get # 1, # 101, # 201, # 301 and so on, and then print them, how do I do it?

3 replies

by ideafixer

I hope you know how to write update queries.

Does each record need to increment by 100? so 301 is the third record? Your last record would be 500,001?

1) First assign an autonumber field. That will increment your records 1 - 5,000.

2)Then you must change the data type to integer.

3)You will need to write an update query to subtract 1 from your autonumber field. Now your records will be numbered 0 - 4,999.

4)Add a new field to the table make this an integer.

5) Write an update query to calculate the new value for this field. The formula would be:

1 + ([AutoNumber Field] * 100)

-Your new field will now be incremented in the way you have described.

This discussion is closed to new replies.