Numbering system

G

Guest

I am using a form with a subform to input the data for a report which is used
as an Invoice. For the numbering of the invoice I use an autonumber field in
the form. The problem is that when a record is deleted or when an invoice is
not finally issued I get numbers in the autonumbering field that do not
correspond to an invoice. What I want to do is to create a field in the form
that will issue the next number only when a certain command or option button
is clicked.
Has anybody any suggestions for this problem?
Thanks in advance
Michalis J.
 
G

Guest

Sometimes by just writing a poblem down helps us put our thoughts in order
and find the solution before getting any reply.
The solution to the above problem is to put a checkbox in the invoice form
which is checked when the invoice is issued. Create a querry which selects
the checked records and then in an appropriate event subrutine of the form
write the following code:

With Currentdb.OpenRecordset("Querryname")
me.Invoiceno=.RecordCount+1
End with
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top