Sari Posted July 21, 2005 Posted July 21, 2005 Hi, I've set up our database to use an incremental number on the creation of a new record. However, if anybody accidentally creates a record and then reverts it, we lose an invoice number and it throws the accountants into a panic!! I presume I need to calculate this in some way? Can anyone help? Many thanks Sari
SlimJim Posted July 21, 2005 Posted July 21, 2005 Your description of the problem suggests that the panic occurs when they are asked whether or not to commit the record and at that point they revert. If that is the only problem you could try having the serial number entered on commit rather than on creation. But this could lead to other problems if you are using portals via the invoice number to enter data. There are other ways that you can auto-enter a serial number which will take care of the most recent entry being deleted - but I know of no automatic method of filling in the holes if earlier entries are deleted. For example make a second TO of your invoice table, Invoice 2, relate by cartesian product and then set up an Autoentry in Invoice number of Max(Invoice 2::Invoice Number) + 1.
Sari Posted July 21, 2005 Author Posted July 21, 2005 Hi, Why would I need to have a second TO of the invoice 2? Thanks for the help, by the way.
SlimJim Posted July 21, 2005 Posted July 21, 2005 The second TO allows you to evaluate the Max over all the records.
Recommended Posts
This topic is 7132 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 accountSign in
Already have an account? Sign in here.
Sign In Now