I need to set up invoices so each new invoice has next available number
assigned.
I have a table Named "InvoiceNumbers " that has a single field =
"nextnumber "
A 2nd table that contains the sales transaction info including a field
named "invno".
Then created a form to input the sales and in the form is where I want
the number to update for each new invoice.
What I have done so far is set up code in the form (BeforeInsert event)
as follows:
Me.Invno=NZ(Dma x("[InvoiceNumbers]","[NextNumber]"))+1
Me.Dirty=False
What is happening is the first invoice will update by 1 and then any
other new invoices will duplicate that same invoice #.
What I'm missing is set up a bound between the field "Invno" and
"nextnumber " - I'm not sure how to do that - I have tried to go into
the control source of the field "invno" in the form and set it up but
keep getting a #Name? error.
I was able to get most of this from the newsgroup but need a bit more
assistance. Thx.
assigned.
I have a table Named "InvoiceNumbers " that has a single field =
"nextnumber "
A 2nd table that contains the sales transaction info including a field
named "invno".
Then created a form to input the sales and in the form is where I want
the number to update for each new invoice.
What I have done so far is set up code in the form (BeforeInsert event)
as follows:
Me.Invno=NZ(Dma x("[InvoiceNumbers]","[NextNumber]"))+1
Me.Dirty=False
What is happening is the first invoice will update by 1 and then any
other new invoices will duplicate that same invoice #.
What I'm missing is set up a bound between the field "Invno" and
"nextnumber " - I'm not sure how to do that - I have tried to go into
the control source of the field "invno" in the form and set it up but
keep getting a #Name? error.
I was able to get most of this from the newsgroup but need a bit more
assistance. Thx.
Comment