Thread: invoice number
View Single Post
  #36  
Old June 17th, 2009, 05:50 PM posted to microsoft.public.access.tablesdbdesign
John W. Vinson
external usenet poster
 
Posts: 18,261
Default invoice number

On Wed, 17 Jun 2009 03:41:01 -0700, cjgav
wrote:

Hi john
This is it:
Private Sub DateCompleted_AfterUpdate()
DMax("[InvoiceNumber]","TblInvoice") + 1


That's just part of it: try

Private Sub DateCompleted_AfterUpdate()
Me![InvoiceNumber] = DMax("[InvoiceNumber]", "tblInvoice") + 1
End Sub

will calculate the next number *and actually do something with it*.
--

John W. Vinson [MVP]