Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

hoiw to assign autonumbers last?

Status
Not open for further replies.

nadir66

IS-IT--Management
May 30, 2002
34
0
0
hi
how can i save (get) the autonumber last, after all other needed data is filled?
thx
 
Why? What are you trying to do? I can't tell from what you've written, but my guess is that you're trying to do something with an autonumber that you probably shouldn't. There are zillions of threads here explaining autonumbers and what they should and shouldn't be used for. Check some of those.

In any case, in a bound form, the autonumber will be generated as soon as the record is created, which happens as soon as you put data in a field.

You may wnat to do some research on unbound forms (check out groups.google.com for the group comp.databases.ms-access).

But my guess is still that you're looking to have sequential numbers in your autonumber field, and that's just NOT going to happen. If that's what you need, you'll have to write or crib code to do it. There's great code to do this in the Access [version number] Developer's Handbook.

Hope this helps.

Jeremy

==
Jeremy Wallace
AlphaBet City Dataworks
Affordable Development, Professionally Done

Please post in the appropriate forum with a descriptive subject; code and SQL, if referenced; and expected results. See thread181-473997 for more pointers.
 
thx for the reply.
I am sorry for not explaining properly.
i have a seq. no (Dmax(field, table)+1 ...
My problem is that the number is assigned on entering the foeld. i would like to set the user to "get" the number on finishing the work docket.
 
Is your form bound or unbound? Is that field an autonumber field? Do you know that that method is unreliable in a multi-user application?

Jeremy

==
Jeremy Wallace
AlphaBet City Dataworks
Affordable Development, Professionally Done

Please post in the appropriate forum with a descriptive subject; code and SQL, if referenced; and expected results. See thread181-473997 for more pointers.
 
Thye field is bound, and it is a number field, (in the table as number) i did not know that it is unreliable. do you know a better system. my other option was a separate table with all numbers and a code to take the nex in line..
 
Yeah, the better version I know is in the book I cited in my first post here. It's expensive, but worth far more than it costs. The payoff for just this one problem will be worth the cost of the book.

Jeremy

==
Jeremy Wallace
AlphaBet City Dataworks
Affordable Development, Professionally Done

Please post in the appropriate forum with a descriptive subject; code and SQL, if referenced; and expected results. See thread181-473997 for more pointers.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top