Hi,
I have a form that uses dynamic default values (form's values are all entered based on the last record's values). There is only one drawback though, the form will automatically fill out the record after the last one entered thus creating a duplicate value.
I have appropriate markers to make sure that only duplicate records are deleted, but the normal deleting code won't work in the On Close event. The error says:
"Run-time error '2046'
"The command or action 'SelectRecord' isn't available now."
The Code I tried is:
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70
I have a form that uses dynamic default values (form's values are all entered based on the last record's values). There is only one drawback though, the form will automatically fill out the record after the last one entered thus creating a duplicate value.
I have appropriate markers to make sure that only duplicate records are deleted, but the normal deleting code won't work in the On Close event. The error says:
"Run-time error '2046'
"The command or action 'SelectRecord' isn't available now."
The Code I tried is:
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70