Order/invoicenumber?

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
 
N

Nikos Yannacopoulos

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
 
H

Harmannus

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



.
 

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

Similar Threads


Top