Order/invoicenumber?

  • Thread starter Thread starter Harmannus
  • Start date Start date
H

Harmannus

Hallo,

I have a tblOrder with the "number" fields "ordernumber" and
"invoicenumber".

Is it possible to "start" these fields with a certain number e.g. 2004001
and add 1 number each time i add a record. Something like "last number + 1"?

If possible where do i add this code? In a event field?
me.ordernumber=lastnumber+1?

Thanx for any tips!


Regards,

Harmannus
 
Harmannus,

I suppose that you enter your new orders through a form,
right? In that case, you could just use the Default value
property of the ordernumber textbox, expression:

=DMax("[ordernumber]","tblOrder") + 1

HTH,
Nikos
 
Hallo Nikos,

Your assumtion is right ;-)

Works great! Thanx!


Harmannus


Nikos Yannacopoulos said:
Harmannus,

I suppose that you enter your new orders through a form,
right? In that case, you could just use the Default value
property of the ordernumber textbox, expression:

=DMax("[ordernumber]","tblOrder") + 1

HTH,
Nikos
-----Original Message-----
Hallo,

I have a tblOrder with the "number" fields "ordernumber" and
"invoicenumber".

Is it possible to "start" these fields with a certain number e.g. 2004001
and add 1 number each time i add a record. Something like "last number + 1"?

If possible where do i add this code? In a event field?
me.ordernumber=lastnumber+1?

Thanx for any tips!


Regards,

Harmannus



.
 
Back
Top