By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,148 Members | 765 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,148 IT Pros & Developers. It's quick & easy.

Delete button

P: 64
Hi there,

I have ms access continuos form.

I tried to put a delete which would delete the current record. but it doesnt work
It doesnt give any error message either.

Following is the code I used

On Error GoTo Err_Command48_Click


DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70

Exit_Command48_Click:
Exit Sub

Err_Command48_Click:
MsgBox Err.Description
Resume Exit_Command48_Click

Please help,

Yogesh
Jul 20 '07 #1
Share this Question
Share on Google+
2 Replies


BradHodge
Expert 100+
P: 166
Is this a subform that is set to continuous?

I ran your code from a continuous form (no subforms) without any problem. If however you run it on a parent form that has child subforms, you don't get anything. In which case you could add Me.YourSubFormName.SetFocus before telling it to delete the record.

Brad.
Jul 20 '07 #2

hyperpau
Expert 100+
P: 184
Is this a subform that is set to continuous?

I ran your code from a continuous form (no subforms) without any problem. If however you run it on a parent form that has child subforms, you don't get anything. In which case you could add Me.YourSubFormName.SetFocus before telling it to delete the record.

Brad.
I agree. In fact, on one of my db projects, I needed to program
a Delete button, custom error messages, a BeforeDelConfirm and an AfterDelConfitm just to have it do what I want it to do.
Jul 20 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.