Topics Search

Object or class does not support the set of events??

Object or class does not support the set of events??
Views: 7
I have created this very simple to use DB that prints out the information you put in.

I get the following message, which is attached. this is happening for both the "Print and Exit" button as well as the "exit without printing".

the code that runs is:

Option Compare Database

Private Sub txt_print_click()
RunCommand acCmdSaveRecord
Call PrintLabels
DoCmd.Close acForm, Me.Name
End Sub

Private Sub txt_exit_click()
Me.Undo
DoCmd.Close acForm, Me.Name
End Sub

The strange thing is that if I close the form, and reopen it again from the switchboard is that it works (sometimes
Sponsored Links:

More topics

 

Error - "Object or class does not support the set of events"

Preview
group
the below error suddenly appeared today.
Been using database for a few years, but lately started going back and forth between access 2007 and the older one.
(getting previous version doesn't help)

"The expression "On Load" you entered as the event property setting produced
the following error: Object or class does not support the set of events.
*The expression may not result in the name of a macro, the name of a
user-defined function, or [Event Procedure]. *There may have been an error
evaluating the function, event, or macro
 

object or class does not support the set of events

Preview
I have a database that is used once a year. It worked last spring but is showing errors now. I am using Vista and Office Professional 2003.

The expression On Click you entered as the event property setting produced the following error: object or class does not support the set of events. Private Sub

Here is a sample of the code that is causing the error:

rptSettlement_Click()
On Error GoTo Err_rptSettlement_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "frmPrtSettlement"
DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_rptSettlement_Click:
Exit Sub

Err_rptSettlement_Click:
MsgBox Err.Description
Resume Exit_rptSettlement_Click

The (mdb) does not work but the (mde) created last year works fine. How do I solve the problem so that my (mdb) file works
 

Object not supported "ERROR"

Preview
I have a place on my form that will open the record

=IIf(IsNull([ID]),"(New)","Open")

Now when I click on this to open the record it gives me an error.

Object or class does not support the set of events!

What would cause this
 

Object doesnt support this property or method

Preview
I am having a problem passing a object as a parameter to my AddCreditCardTransaction Sub within my CreditCardBatch class.

In my CreditCardBatch class, I have this sub procedure

Public Sub AddCreditCardTransaction(CreditCardTransaction As clsCreditCardTransaction)
MsgBox (CreditCardTransaction.CustomerName)
End Sub

In a module, I have the following code:

Public Sub test()

Dim obatch As New clsCreditCardBatch
Dim oCC As New clsCreditCardTransaction

obatch.AddCreditCardTransaction (oCC) << I get an error message here

End Sub

I get an error stating that the object doesnt support this property or method.

Any suggestions why I am getting this error. Can I not pass an object to a sub procedure in another class, and use the Credit Card object properties in the CreditCardBatchClass
 

Unexplained Error Message

Preview
The expression On Click you entered as the event property setting produced the following error: Object or class does not support the set of events.

The expression may not result in the name of a macro, the name of a user-defined function, or [Event Procedure].
There may have been an error evaluating the function, event, or macro
 

Dynamic class declaration

Preview
I am writing an application and I have a lot of custom classes. I want to create a function which retrives with a new object, but I want to determine the class of the object in runtime as a parameter of the function. Is that possible somehow to declare a new object on an other way than the usual?
Dim obj as Object
Set obj = New CustomClass
 

Compatibility issues with Access 2010?

Preview
I created a database in 2007 format, and have added a new form to it in 2010, (plus a few more queries and tables). When I open the form, I get the below error message.

"The expression On Click you entered as the event property setting produced the following error: Object or class does not support the set of events".

If I go into design mode, view the VBA I wrote and then come back out again - the form and all buttons work fine (until the next time I open the database).
 

MS Access 2007 form.Load

Preview
I have just installed MS Access 2007 having previously used 2002. 2007 will run my .mdb files ok. It allows me to create .mde files. I can open a form ok provided there is no code in "On Load"
However,

Private Sub Form_Load()
Const dbg = False
End Sub

2007 displays the following error:-
"the expression On Load you entered as the event property setting produced the following error: Object or class does not support the set of events"
 

deleting control corrupts from

Preview
I have a form (with serveral controls tabs, etc.)
As soon as I delete a control (and, actually, I'd like to delete several), then save the form. it no longer opens (presumably, it is corrupt?)
Compact and Repair does not help.

at best, I get these errors
- when opening the form from a command button on another form: "the OpenForm action was canceled"
-when opening the form from the project explorer: "the expresion on Open you entered as the event property setting produced the following error: Object or Class does not support the set of events."

and suggestions about what the problem might be?
Mark - "the Frustrated
 

Phantom Form Class Object

Preview
I have a form in my database named DataEntrySummary.
In the Class Objects list, I see two entries:
Form_DataEntrySummary
Form_dataentrysummary

When I right click on the class object and select View Object, both class objects open the same form. But they open two separate copies of it.

When I view code instead, I get two different versions of the code for this form!

If I delect form DataEntry Summary, the class object DataEntrySummary disappears, but the class object dataentrysummary remains.

I have of course tried repair and compact