custom field number

  • Thread starter Thread starter chriske911
  • Start date Start date
C

chriske911

wich event do I need so that a new record gets a custom number?
regardless of how that new record is created
ie a copy of a previous record
the records are in a subform

I tried on the current event with if me.newrecord
but it also gets fired upon opening the parent form

thnx
 
I rarely use Custom Number Sequence but if I do, I would use the
Form_BeforeUpdate Event (of the Subform's Source Object in your case).
 
I rarely use Custom Number Sequence but if I do, I would use the
Form_BeforeUpdate Event (of the Subform's Source Object in your case).

I know but for invoices it is unavoidable :-(
the before update event works but it's annoying for the users cause now
the number gets created at the end of the invoice
it feels backwards even if it's really not that illogical ;-)

grtz
 
You can use the Form_BeforeInsert Event but there are potential problems
with this on a multi-user system. Form example: UserA starts creating a new
Invoice and the system allocates InvNo 1. UserB starts another Invoice and
the system allocates 2. UserA then decides to undo the Invoice creation
then the InvNo 1 is not used but InvNo 2 is used (and you end up like
incremental AutoNumber Field!).

Actually, it sounds more logical to have the InvNo allocated after the data
has been entered. After all, it is a reference number and it is logical
that there exists some real data first for the reference number to refer to!
 
Back
Top