Acess97 Delete Record

K

katz

Hello All,
All of a sudden I cant delete a record thrue code "DoCmd.RunCommand
acCmdDeleteRecord" only thru Edit and Delete or Macro.
I get a message The command or action DeleteRecord isnt available now.
Please help.
Thanks, Abe
 
K

katz

Thanks Nick!
I have a Button on my form that calls this function.
DoCmd.Beep
msg = "ARE YOU SURE TO DELETE THIS RECORD?"
Response = MsgBox(msg, 4 + vbQuestion, "Delete Record")
If Response = 7 Then Exit Function

DoCmd.SetWarnings False
DoCmd.RunCommand acCmdDeleteRecord
DoCmd.SetWarnings True

I found the problem already, I put 600 on the Timer Interval property
together with the on timer, on my Main Menu that starts when I open the
database. I use it to make a control blink. This caused the problem that I
couldn't delete any record thru code.
I dont know what the timer has to do with deleteting records. I guess I dont
know everything.
Thanks for your time
You are a good man
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top