I am working on a database that I need to have a field that repeats a series of numbers. The field in the first record will be the number 1. When I create a new record I want to auto-enter 2. In the next record 3, but the next one I would like to start over at 1. I can do this with a script, but would like it to run as auto-enter when creating a new record. Is this possible? Can someone show me the required calculation?
Thank You,
Brian
Auto Entry Problem
4 posts
• Page 1 of 1
Posts: 3
Joined: Tue Apr 11, 2006 1:06 pm |
|
Posts: 2764
Joined: Thu Nov 20, 2003 11:01 am |
Assuming you have another field that is an auto incrementing serial number called "serial", you could have an auto enter calc like this for your 123 field:
Choose ( Mod ( Serial ; 3 ) ; 3 ; 1 ; 2 ) John Sindelar
SeedCode |
Posts: 3
Joined: Tue Apr 11, 2006 1:06 pm |
Thanks John.
I think this will work. I can create the Serial number field that will count 1,2,3,4 etc and make that not visible. It appares to work for keeping my numbers to 1 2 3 1 2 3. Also thanks for the fast response. |
|
Mod ( Serial - 1 ; 3 ) + 1 returns the same result. |
4 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 4 guests