I have a failry simple data entry form that autonumbers the primarykey, and has a field for a name, date, and some text. All the fields are required. The form works fine if everything is entered as required. My problem happens when I try to exit the form when all the required fields are not complete.
I've trapped the error so I can't exit without the form being completed with if's and else if's, but how about when I get half way through the form and decide I don't want to contiue I just want to exit out and delete everything?
I've tried
'DoCmd.SetWarnings False
'DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
'DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70
'DoCmd.Close
and
'DoCmd.RunCommand acCmdDeleteRecord
'DoCmd.Close
and some type of sql command that deleted every in the table.... including the stuff that I wanted to keep.
I have a feeling i'm not even close and going about it in the worng way. Any ideas?
I've trapped the error so I can't exit without the form being completed with if's and else if's, but how about when I get half way through the form and decide I don't want to contiue I just want to exit out and delete everything?
I've tried
'DoCmd.SetWarnings False
'DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
'DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70
'DoCmd.Close
and
'DoCmd.RunCommand acCmdDeleteRecord
'DoCmd.Close
and some type of sql command that deleted every in the table.... including the stuff that I wanted to keep.
I have a feeling i'm not even close and going about it in the worng way. Any ideas?