Autonumber Prob

  • Thread starter Thread starter KRISH
  • Start date Start date
K

KRISH

Hi! everybody

My autonumber field is automatically increasing. I want to
reinitialise it to 1. Please help how to do that. Thanks

Krish
 
My autonumber field is automatically increasing. I want to
reinitialise it to 1. Please help how to do that. Thanks

.... if you care what the value of an autonumber is, then you probably
shouldn't be using an autonumber ...


B Wishes


Tim F
 
You are perfectly right reinitialisation is not required
if the package is ready for use. Actually I entered some
records to test my package which increasing the autonumber
field. So I want to delete the old records and
reinitialise before I start entering the actually required
data. So that my required records should start with 1. I
you have the solution please help.

Krish
 
Krish

You've explained what you are attempting to do, but not why there is a need
to display the Autonumber. Recall that we've advised that it is rarely
appropriate or suitable for display. Let me try asking a different way.

What bad thing will happen if you do not "reset" the Autonumber?

Jeff Boyce
<Access MVP>
 
Secondly, in my database i am having two fields,
[Application ID] as autonumber type and [Form No] as Text
data type. In lost focus of [Form No] in my form I am
writing a code which will check the [Form No] is already
existed in my database, whose year also same. If it exists
then it will cancel the event and go to that particular
record for further modification of the record.

Further to what Jeff says, it's not clear why you have an autonumber column
in this table at all. If the combination (FormNo, YearNumber) is unique,
which seems to be what this paragraph says, then why not simply use that as
the PK? What extra do you get from using a AN -- other than, as you have
discovered, the disappointment that ANs don't do what you want them to?

As a second point, it might be helpful to give your users some method of
picking the YearNumber and FormNo[1] before starting to enter new data, so
that they don't have to throw it away when it transpires that it's already
there.

Hope that helps


Tim F


[1] PS: please don't use spaces in object names for tables or fields:
although it's legal in Access at the moment, it creates lots of problems
and will get you back later...
 
Back
Top