20 pts.
 Microsoft Access AutoNumber
Hi , I want to add a row of serial number for the existing records in MS access .Whenever I am trying to define a new row with type as "Auto Number" and save the same it automatically gets changed to Text type.Please suggest.Also, the requirement is modified and now the serial number has to be of 8 digits i.e. the first number should be 00000001 and the max length should be of 8 digits as this field is being received by an external system and this system will accept only 8 digits .Is it possible to do in MS access and how can I do the same. I am allowed to use VB as well,so can anyone please let me know how it can be done through any of these. Thanks, Ansh

Software/Hardware used:
ASKED: February 25, 2009  12:01 PM
UPDATED: February 25, 2009  5:00 PM

Answer Wiki:
Hi Ansh, The only way I know how to do this in Access is to create a text field with an input mask of 00000000. Which would require any entry to be all numbers and have at least 8 digits. Now you would have to write code to fill in this information for Access's autonumber can't do it for you. One option is when they are entering new data, use the after insert and insert into the serial number field the last serial number in the table plus one. I.E. serialnumber = dlast("serialnumber","table1")+1 Dustin
Last Wiki Answer Submitted:  February 25, 2009  5:00 pm  by  RoadDust   390 pts.
All Answer Wiki Contributors:  RoadDust   390 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _