H
Haleigh
My form has a cmdCancel button which, when clicked, should
cancel creation of a new record and exit the form. For
some reason, however, none of the commands I've tried will
delete! Here's what I've tried:
------------
These commands were produced by the button Wizard:
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70
Access Help doesn't really explain what the codes mean, so
I'm not really sure what it's trying to do. Commenting out
either one of the lines doesn't do anything, but together
they produce the error "The Search Key was not found in
any record."
-------------
I found the following code in this community:
DoCmd.SetWarnings False
DoCmd.RunCommand acCmdDeleteRecord
DoCmd.SetWarnings True
This also produces the error "The Search Key was not found
in any record."
--------------
I know that, as soon as you enter something into a field,
Access creates the record in the table, whether you
actually Save the record. But, for the heck of it, I've
tried issuing "DoCmd.DoMenuItem acFormBar, acRecordsMenu,
acSaveRecord, , acMenuVer70". The same error message
occurs.
BTW, the form is set to allow edits, deletions, additions
and data entry.
Could someone advise what is going on ASAP?
Thank you very much,
Haleigh
cancel creation of a new record and exit the form. For
some reason, however, none of the commands I've tried will
delete! Here's what I've tried:
------------
These commands were produced by the button Wizard:
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70
Access Help doesn't really explain what the codes mean, so
I'm not really sure what it's trying to do. Commenting out
either one of the lines doesn't do anything, but together
they produce the error "The Search Key was not found in
any record."
-------------
I found the following code in this community:
DoCmd.SetWarnings False
DoCmd.RunCommand acCmdDeleteRecord
DoCmd.SetWarnings True
This also produces the error "The Search Key was not found
in any record."
--------------
I know that, as soon as you enter something into a field,
Access creates the record in the table, whether you
actually Save the record. But, for the heck of it, I've
tried issuing "DoCmd.DoMenuItem acFormBar, acRecordsMenu,
acSaveRecord, , acMenuVer70". The same error message
occurs.
BTW, the form is set to allow edits, deletions, additions
and data entry.
Could someone advise what is going on ASAP?
Thank you very much,
Haleigh