Create a rolling counter for records 1 - 50 repeating

oliviar

Board Regular
Joined
Sep 12, 2010
Messages
184
Hi Guys,

I am wondering how to put a value into a form field that is a number between 1 - 50.
If the previous record is 1, then this record has to be 2, and if the last one was 50 then this has to be 1.

I am totally stumped and would appreciate some insight.


:confused:
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
I think a little more detail is needed.
Can you explain in more detail exactly what you are trying to accomplish?
Is your Form bound or unbound?
A good way to remember a previous value would be to make this counter a bound field.
 
Upvote 0
Its all bound.

I have a category field and a counter field (and then the other details)
I need my records to go like this:

A1 zzzz
A2 zzzz
A3 zzzz
....
A50 zzzz
B1 zzzz
B2 zzzz
B3 zzzz
B4 zzzz

So the counter field goes up to 50, then back to 1. It rolls through these numbers.
 
Upvote 0
Is this a continuous form?
Is it an entry form?
Do you want this value to be pre-populated as you enter new data?
Do you use an Autonumber field in the table that the Form is bound too (this will be helpful in determining what the last record entered was)?
 
Upvote 0
if you want to be able to start over again, then you need to know WHEN records were created. Add this field to your table:

dtmAdd, date/time. defaultValue = Now()

well this is the first step ... but before I tell you the rest, I must ask why?
 
Upvote 0

Forum statistics

Threads
1,224,585
Messages
6,179,704
Members
452,938
Latest member
babeneker

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top