Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Counter?-increment by 1 ea record, however ea yr the starting # diff

Status
Not open for further replies.

dandt

Programmer
Nov 23, 2003
2
US
A organization issues another company a list of numbers to use the coming year. It increments by 1 for each record. Each year the organization gives that company a different starting number. For example, if the 1st year the tag number starts with 1000. Each tag issued for that year would be incremented by 1, so each record would be 1001, 1002, etc. Next year, the tag start with 16000, then each record for that year would be 16001, 16002, etc. There is no ending number. This tag number needs to be reported as used to the organization. How and where on the form or table can be done? How do I do this?

Thank you :->
 
Create a query and add the Tag Field. Turn on the Totals (on menu bar go to View...Totals). On the Total line, set the Tag field to Max. This will always return the MaxOfTag value.
Then you can do what you need with it.

Paul
 
That didn't seem to work. I need the tag field to increment by 1 for each new record (tag issued). Then when the tag is reissued for the next year, a new tag number needs to issued with a totally different tag number.
For instance this year, all tags issued will be starting at 1001, so the next one needs to be 1002, next one 1003, and so on. However the organization will give out completely new starting numbers for the next year, so the new tag number for next year may start with 15001 and the next tag issued will be 15002, and the tag after that will be 15003. Hope this is a little clearer. Every time a tag is issued, it will increment by one.
Thanks
 
If the numbers are always increasing, you just need the last number issued to be stored in a table. Then a form could show that Number+1 for the next number as the default value when the form is displayed. The user would hit an "assign" button to increment the value when it is given to the other company. If they want to jump to a new number, they enter the new number and then hit the "assign" button.

If you want to track all of the assigned numbers, call an append query or do an "Add New" command when a number is assigned before incrementing the displayed number.
 
Sorry, I thought the means was in place for them to increment already and you just needed the last value. You can look at this FAQ by Michael Red
forum700
Then I would assume that you would have to decide how to handle each new years Tag value. You could create a new Table each year, start the values where you need to and then bring all the individual tables together in to one using a Union Query.

See if any of that helps.
Paul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top