If the numbers don't have to be sequential with no gaps, then an autonumber field for the serial number would do the job, especially if you were just starting.
Alternately, the process of determining the next number should be to read the current max value from the control table (which I'm assuming is a table with one record holding the value of the highest control number), and IMMEDIATELY increment the value by one in the control table.
When you do this will determine if you have any gapsin the numbers. If you don't assign the number until you save the added transaction data, then you probably won't have any gaps. However, if you have transactions that have a header table and a related detail table that are related by the transaction number (the serial number you mention), then you must have the serial number before you can add detail data. In that case, if someone is adding data and then decides to trash the transaction, the number will never be used.
Unless it's really critical to have no gaps, I would use this method. (The autonumber is easier, but since you already have numbers assigned, I'm sure you don't want to renumber the transactions.) While there is a very brief exposure to the same number, you should beable to set up the code so the incrementing occurs quickly or even in one step before you read it.