J
John Michael
I have a form that is used to add new records to a table. When I tab
through the form if I don't fill out the required fields, when I hit the
last command button which is that last one in the tab order that I have set
to cancel and close the form, it will add the record to the table even
though I have not pushed any command button to save the record. Again, I am
only tabbing through the form. It automatically adds the record and clears
the form for another record to be entered before going back to the first tab
index 0. If a required field in the form is not filled, I will get the
error that the field is required.
Why won't it just go to the tab index 0. If the form is filled out and I
tab through the cancel button, it will still save the record even if I add:
DoCmd.DoMenuItem acFormBar, acEditMenu, acUndo, , acMenuVer70
to the cancel button event proceedure for that command button. The record
has already been added. IF I don't tab through it, it will not save the
record.
How can I stop this.
I have
Allow Additions & Data Entry set to Yes.
I guess I could I remove the Record Source property and update the table
using SQL and VB.
Also, I have seen in one of my books that there is a form property in the
data tab,
Commit On Close
but it doesn't show up on my computer.
I am using Access 2002
Thanks in advance
This news group is excellent. Could not get along without it.
John Michael
through the form if I don't fill out the required fields, when I hit the
last command button which is that last one in the tab order that I have set
to cancel and close the form, it will add the record to the table even
though I have not pushed any command button to save the record. Again, I am
only tabbing through the form. It automatically adds the record and clears
the form for another record to be entered before going back to the first tab
index 0. If a required field in the form is not filled, I will get the
error that the field is required.
Why won't it just go to the tab index 0. If the form is filled out and I
tab through the cancel button, it will still save the record even if I add:
DoCmd.DoMenuItem acFormBar, acEditMenu, acUndo, , acMenuVer70
to the cancel button event proceedure for that command button. The record
has already been added. IF I don't tab through it, it will not save the
record.
How can I stop this.
I have
Allow Additions & Data Entry set to Yes.
I guess I could I remove the Record Source property and update the table
using SQL and VB.
Also, I have seen in one of my books that there is a form property in the
data tab,
Commit On Close
but it doesn't show up on my computer.
I am using Access 2002
Thanks in advance
This news group is excellent. Could not get along without it.
John Michael