i have used wizard. in my database there is a table name patient.
in it i have PatientId, FirstName etc
i have set Patientid - Autonumber
on the form i have a button call add and a button call cancel and textbox call txtid ..
in the add button it contain the following code
Me.PatientDetailsBindingSource.AddNew()
and in the cancel button it contain the following code
Me.PatientDetailsBindingSource.CancelEdit()
bt my problem is that whenever i click the add the txtid increment by 1 and when i click cancel it does not make any change bt when i click add again it always increment.
Last Patientid =4
First Time i click add --->txtid = 5
when click cancel --->txtid=4
second time i click add --->txtid=6
when click cancel------->txtid=4
Third time i click add --->txtid=7
when click cancel------->txtid=4
it always increment...
i want want it to increment only wen i click add
Can some1 help me here...