Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Auto Id Generator

Status
Not open for further replies.

Quique79

Programmer
Dec 18, 2001
15
MX
Hi!!

I'm designing an form that will work as an Invoice, my problem is, that I want that every time I add a new record (or invoice) the Invoice No. will be generated automatically.

I was trying to obtain this number from a separated table (InvoiceNo) and inside the Invoice form to put a field with this value and when I press save button, save all info in the Invoice Table and increase the InvoiceNo., so, everytime it will be automatically, but, when I try to do it but it doesn't function... any tip or hint?

Quique79
 
You migh look at the example in faq700-184. It was written for MS. A. '97, and is NOT the easiest to implement, but it DOES have some commentary / documentation.


MichaelRed
m.red@att.net

There is never time to do it right but there is always time to do it over
 
Try this

Put the following code in Default Value under the Data tab in the properties section of your text box.

=DMax(" [Invoice Number] ","YOURTABLE")+1
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top