How do i create Invoice Number in Access which is generated autom.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to make Invoice and want to have a feild which is Invoice number that
should eb generated automatically
 
You did not give me much to work with, but you could use:
=InvNum: "newinvoice" & Format(Max(Val([Cnt#]))+1,"000000")
I made a few assumptions,
I assumed that you wished to have some uniform alfa
characters, I used "newinvoice", than I assumed that you
wish to have a sequential numeric portion, I used
Format(Max(Val([Invoice#]))+1,"000000")
this sets a constant format of ######,
it looks for the maximum numeric value in your table for
the field "Invoice#"
and it adds 1
if the current largest invoice is "newinvoice000123" the
result would be "newinvoice000124"
Hope this helps.
Fons
 
Back
Top