After Del Confirm error

G

Guest

I created an event procedure for the After Del Confirm event on a subform.
When I perform a delete on a record on that form, I receive the confirmation
that I am about to delete 1 record, click OK, and then receive the following
error message:

"The expression After Del Confirm you entered as the event property setting
produced the following error: A problem occurred while Microsoft Access was
communicating with the OLE server or ActiveX Control"

I cannot figure out what is causing the error. Thoughts?
 
M

Mark

It would be helpful to see the code you wrote for the event. There's
something in there that Access doesn't like.
 
G

Guest

The code is quite simple:


Private Sub Form_AfterDelConfirm(Status As Integer)
MsgBox "1"
Forms![Bids]![ListBoxOfVendors].Requery
MsgBox "2"
End Sub

The MsgBox's are just in there for debugging. It doesn't even make it to
the first MsgBox before the error. I did notiice when I went in to build the
code initially, there was a sub-proc named the same thing with no code in it,
like I had added an Event Procedure earlier but then removed it from the form
property but didn't actually delete the sub-proc definition. That may have
something to do with it. But if it does, I don't know how to resolve the
issue.
 
G

Guest

Must have been something funky in the form. I imported all of the objects
into a new database and that fixed it. Must have "reset" something when I
did the import.

Transient said:
The code is quite simple:


Private Sub Form_AfterDelConfirm(Status As Integer)
MsgBox "1"
Forms![Bids]![ListBoxOfVendors].Requery
MsgBox "2"
End Sub

The MsgBox's are just in there for debugging. It doesn't even make it to
the first MsgBox before the error. I did notiice when I went in to build the
code initially, there was a sub-proc named the same thing with no code in it,
like I had added an Event Procedure earlier but then removed it from the form
property but didn't actually delete the sub-proc definition. That may have
something to do with it. But if it does, I don't know how to resolve the
issue.

Mark said:
It would be helpful to see the code you wrote for the event. There's
something in there that Access doesn't like.
 

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

Similar Threads

OnEvent Procedure Error 1
On Current Expression error 1
Error message 2
Error while openning form 3
Form won't open 2
Form Open Error Message 1
What Event to use when record deleted 1
problem when open a form 1

Top