Expressions

  • Thread starter Thread starter Allan Martin
  • Start date Start date
A

Allan Martin

I have a field in our db, (Access 2000)that has an
autonumbering function, (counter). We use this field to
generate record numbers that we don't want displayed or
changed in the application, but I want to use another
field in the table to have an ID number automattically
generated. Can I create an expression in the ID_Number
field to point at the counter field and say multiply it by
one or even add one to it to generate that ID_Number?
 
Can I create an expression in the ID_Number
field to point at the counter field and say multiply it by
one or even add one to it to generate that ID_Number?

If you are going to have a fixed relationship to the autonumber, why not
just use the expression in the query, which would be quicker, smaller and
safer?

Tim F
 
I have a field in our db, (Access 2000)that has an
autonumbering function, (counter). We use this field to
generate record numbers that we don't want displayed or
changed in the application, but I want to use another
field in the table to have an ID number automattically
generated. Can I create an expression in the ID_Number
field to point at the counter field and say multiply it by
one or even add one to it to generate that ID_Number?

I'm not sure I understand the benefit of such a redundant field! It
would share all of the disadvantages of the Autonumber as regards gaps
and editability (at least it wouldn't be editable if you want it to
maintain its value relative to the autonumber), without even the
benefit of automatic generation.

If you're going to settle for an ID which has gaps, can become random,
and is hard to maintain... why not just use the Autonumber itself?
 
Back
Top