Well, if you enter the Bill No in a database, at the start of the program select the maximum bill no from the database and use that as your starting number rather than zero, and do not let the user enter it manually. Hope this helps, its fairly normal practice.
Bob Ashfield Consultants Ltd