Connecting Tech Pros Worldwide Forums | Help | Site Map

Starting number

Member
 
Join Date: Sep 2007
Posts: 56
#1: Jun 23 '08
Hi all,
I created a form for delivery challan in ms-access in 2007-08 and now when i copied same format for current year it is starting with same old number. I want to start it from number :1 for current financial year.

i need your suggestions

7 of 9's Avatar
Newbie
 
Join Date: May 2007
Posts: 23
#2: Jun 23 '08

re: Starting number


I think I may be able to help you but first can you explain your problem more clearly.

What number are you talking about?
Where is this number coming from?
etc...
NeoPa's Avatar
Administrator
 
Join Date: Oct 2006
Location: London - UK
Posts: 15,727
#3: Jun 25 '08

re: Starting number


...You may also want to consider what else makes up the Primary Key of your table.

These are details which can make the problem so much easier to answer. Well, to put it more accurately, the absence of these details makes a relatively simple question much harder.
Member
 
Join Date: Sep 2007
Posts: 56
#4: Jun 27 '08

re: Starting number


i told a form for delivery challan, in that i am asking about delivery challan number (i took it as autonum) / for current year i want to start it from no:1 instead of continuing number (eg. 131)
NeoPa's Avatar
Administrator
 
Join Date: Oct 2006
Location: London - UK
Posts: 15,727
#5: Jun 27 '08

re: Starting number


This seems to be a simple repetition of your original post and provides no more information.

That's not an offense, but please don't expect too much help if you can't even provide the basics that you've been asked for.

If you have a problem understanding what's being said, please let us know.
Member
 
Join Date: Sep 2007
Posts: 56
#6: Jul 11 '08

re: Starting number


I created a form for delivery challan in ms-access in 2007-08 with fields like s.no (autonumber), item description (text), quntity (number), consignee address etc. Now when i copied same format for current year the S.NO. field (autonum field) is continuing the old sequence from the last fin. year but I want to start it from the beginning i.e. from No.1 for current financial year.

is this clear sir
7 of 9's Avatar
Newbie
 
Join Date: May 2007
Posts: 23
#7: Jul 11 '08

re: Starting number


Quote:

Originally Posted by vsts2007

I created a form for delivery challan in ms-access in 2007-08 with fields like s.no (autonumber), item description (text), quntity (number), consignee address etc. Now when i copied same format for current year the S.NO. field (autonum field) is continuing the old sequence from the last fin. year but I want to start it from the beginning i.e. from No.1 for current financial year.

is this clear sir


WOW!

After reading this a few times I think I get what you are trying to ask. Did you simply copy and paste the table then erase all of the old records and attempt to add data? If so that is your problem. If you create a table and assign a field (S.NO in your case) as an AutoNumber and simply copy and paste the table the autoNumber will continue even if you delete all of the records in the "new" table. When you copy make sure that you select "Structure only" before you paste it this will cause the AutoNumber to reset. Hopefully that solves your problem
NeoPa's Avatar
Administrator
 
Join Date: Oct 2006
Location: London - UK
Posts: 15,727
#8: Jul 11 '08

re: Starting number


I'm afraid that it's not much clearer no.

However, I can say that if S.No is an AutoNumber field then you will not be able to control the sequence. That's what the "Auto" part of AutoNumber means. Also, being a unique reference, starting the number again each year would cause the same numbers to be reused (which would fail of course).

You need to consider what you're trying to achieve, then design a database that supports that. You're the only who knows anything about that so we can't help there.

It IS possible to have a table where numbers are created which count sequentially for each year - but only if a prefix is used or the actual Primary Key is made up of a year indicator AS WELL AS a sequential number.

To give any help with that though, we would need a much more clearly specified question.
Reply