M
Malik via AccessMonster.com
Hi,
I Have a Sale Invoice Form, which has a SaleID TextBox, This Field
automatically generate the next number on a new sale Invoic. I m using the
following script for this fiels :
in Form Load Event
Me!SaleID = NZ(DMax("[SaleID]", "[tablename]")) + 1
I Have "Save' And "Cancel" Command buttons on the form.
Now I have a problem that If I fill all required feilds in the form and I do
not save the record but Cancel or clear the current record on the the form,
Next Time it gives me a new Sale Id number.
For Example :
i m entring Data:
Sale Id : 56
Customer Name: Abc
Sales Details: XYZ
Now I Cancel It, Dont save the record, Close the form,
But Now when I will open the form The SaleId Will Put the No 57 in the field
while I have not saved any data on Sale Id no 56.
please tell me that how to control It.
I Have a Sale Invoice Form, which has a SaleID TextBox, This Field
automatically generate the next number on a new sale Invoic. I m using the
following script for this fiels :
in Form Load Event
Me!SaleID = NZ(DMax("[SaleID]", "[tablename]")) + 1
I Have "Save' And "Cancel" Command buttons on the form.
Now I have a problem that If I fill all required feilds in the form and I do
not save the record but Cancel or clear the current record on the the form,
Next Time it gives me a new Sale Id number.
For Example :
i m entring Data:
Sale Id : 56
Customer Name: Abc
Sales Details: XYZ
Now I Cancel It, Dont save the record, Close the form,
But Now when I will open the form The SaleId Will Put the No 57 in the field
while I have not saved any data on Sale Id no 56.
please tell me that how to control It.