Jump to content

Date related serial number


This topic is 8454 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies

I am modifying a database for a charity and need an auto-generated serial number for their fund-raising events that appears like this 2001/001, 2001/002....2002/001, 2002/002 etc.

The first part of the number is generated from the date of the event but I am unsure how to do the changing number part. What I see as my difficulty is that some events are planned in the previous year. So event 2002/002 might be created before event 2001/010.

How do I ensure that the second part of the serial number relates to the correct year?

If I'm thinking wrongly please let me know.

dt

Link to comment
Share on other sites

There are a couple of solutions posted on databasepros.com. What I do is create a self-relationship based on the year (2001) and create a serial number (your 005) that is the [max+1] of all the serial numbers that match the relationship. You have to use a script.

Link to comment
Share on other sites

This topic is 8454 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.