automatic numbering

  • Thread starter Thread starter LCalaway
  • Start date Start date
L

LCalaway

Hi-
I have a table design in place using autonumber so that each record will be
unique. However, in addition to that autonumber, I would like to have a
second field which will automatically increment based only on that second
field. The incremented number needs to be capable of being overridden and
the next record must pickup the numbering from the previous record.

Is the above possible if there is nothing in the database except a table and
data is entered directly to the table.
Thank you.
L Calaway
 
Create a query to find the Max of that field. In your data entry form have a
hidden text field of the query. Then set default of your field to the hidden
field plus one.
 
However, in addition to that autonumber, I would like to have a
second field which will automatically increment based only on that
second field. The incremented number needs to be capable of being
overridden and the next record must pickup the numbering from the
previous record.

Why do this in the table? It'll be a nightmare to keep updated every time a
record is inserted or (especially) deleted. As far as I can tell, the
ranking number will not be an attribute of the thing-being-modelled anyway,
because it's going to change.

You may well be better served by using a ranking query to _display_ the
number rather than trying to store it and having it tell lies to you.

B Wishes


Tim F
 
We are extracting data from thousands of records. Those records have
numbers already assigned which must be retained; they are part of the
attributes of the original record, and have no other purpose. All I want to
accomplish is that the extractor doesn't have to enter that number itself in
a field. The numbers increment, generally without gaps. The field has to
be one which can be controlled. And, instead of a form, the extractions are
going directly into a table simply because there are so few fields which are
being extracted.
 
Back
Top