Expressions

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?
 
T

Tim Ferguson

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
 
J

John Vinson

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top