Hi all,
I making a project for that i need a database and I am taking a field AutoNumber in my database.
So my query is Can I start the first number from 10000?
Thanks
It is possible but it isn't advised. To be honest I am not sure exactly how to do it anyway so if you google it I am sure you can get some code. However, in my experience, it's not a great idea to use a Primary Key or autonumber field to store a meaningful number. It's best to leave this as it is or if you specifically need this to be a certain number, enter it manually instead.
I have spoken to people who want to create and ID field which combines text and numbers, so they create a seperate field for the text section and AutoNumber the second part of it. The same might be useful for your numeric fields.
If this is no help, ignore me
All the best
Thanks sim but which project i've given need the AutoNumber start with 10000.......right now m not getting any possible option but i hope i will get it soon if u've got any solution please rply......
Yes, you can.. to do this:
Create the first table that contains the counter typefield that you want to start on another number. Don'tenter any records.Create a second table, with a single long integer number type field that has the same name as the counter field in the first table. Create a record in the second table by entering a number one less than the number you want to start the counter at in the first table. Create an append query, to append the one record in the second table to the first table,and run it Delete the second table, delete the record that you appended to the first table, and start entering data.
Another Method:
You can make an Append query that just appends a value
from a parameter, to just the auto-number field (as
long as no other fields are required), e.g.:
Also, Get the information from this site mvps.org that will help withCode:PARAMETERS [Number] Long; INSERT INTO tblAuto ( intNumber ) SELECT [Number] AS Expr1;
Access.
Good Luck
ExlGuru
What purpose do you need the Autonumber to fulfill by starting at 10000? Is it for an invoice / order number or something like that?
In the past, if I've needed a number for that purpose, then I've either just reference the autnumber on a form or query, by creating a field with autonumber plus 10000 (or 9999 if you want record 1 to be 10000).
Is there a reason that you need this number on the table?
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks