Help!!! Invoice Numbers on Forms

hullstorage

Registered User.
Local time
Today, 21:38
Joined
Jul 18, 2007
Messages
213
I am thinking of creating a new project as i have always had problems with invoice numbers so if anybody can help me in the right direction
this would be much appreciated.

first of all i must state that the invoices are monthly so there are say
20 records for one customer and say 15 for another which need to appear on the invoice

what i am going to do is create a form based on a query that will list all job not invoiced for a given customer then i would like to create a button to generate an invoice number for these jobs

this will then generate an invoice number to all the jobs

i need it to somehow find the last invoice number used so they are not duplicated in anyway

any help would be great thanks

i'm fairly new to this so go easy on me please and i don't really want to start looking at the northwind database

thanks again
 
Select MAX(InvNo) from Invoices, but I bet that is to simple for your needs. What is the format of your invoice number?
 
Select MAX(InvNo) from Invoices, but I bet that is to simple for your needs. What is the format of your invoice number?


just a simple invoice number like 6543 and then 6544 etc etc...

sorry to sound thick but how and where would i use selectmax
 
Depends what you are trying to do.
use an event procedure and in it try this (you will have to change it for your environemnt)

dim LastInvoiceNo as long
LastInvoiceNo = dmax("InvoiceNumber","InvoiceTable")
Me.NewInvoiceNumber = LastInvoiceNumber + 1
 

Users who are viewing this thread

Back
Top Bottom