Results 1 to 6 of 6
  1. #1
    mejia.j88 is offline Competent Performer
    Windows 7 32bit Access 2007
    Join Date
    Nov 2011
    Location
    california
    Posts
    228

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

    hello all,

    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).

    not sure what is happening here, any help/suggestions would help.

    thank you.

  2. #2
    aytee111 is offline Competent At Times
    Windows 7 32bit Access 2010 32bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    Sometimes I find that if I add the VB Extensibility reference then things start working. I don't know enough about any of it to know it this is your problem or not. In the VBA editor, go to Tools and References and add that one - can't remember what it is called exactly.

  3. #3
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    Quote Originally Posted by aytee111 View Post
    Sometimes I find that if I add the VB Extensibility reference then things start working.
    this has absolutely nothing to do with it. The primary purpose, as far as I know, of the extensibility DLL is to be able to manipulate a VB project and its dependencies by the actual code that's IN the project.

    mejia,

    accept for your PrintLabels() procedure, which you did not post, nothing is wrong with your other code.

    And to discern anything from the symptoms you're mentioning here, it would be impossible to do for a number of reasons.

    But YES, basic has some serious problems associated with it, namely the extreme inconsistent nature of its execution, especially when interfacing with other applications. The variables to these issues are endless, as they always are with MS technology.

    The only reasonable solution to decrease the stress of dealing with MS client-based software is to do one of 2 things, IMO:

    1) Migrate to IIS and any other server-side interfacing MS language.
    2) Ditch MS technology all-together.

  4. #4
    mejia.j88 is offline Competent Performer
    Windows 7 32bit Access 2007
    Join Date
    Nov 2011
    Location
    california
    Posts
    228
    yeah i didn't think so either, i've put other DB's together in a similar fashion. PrintLabels i use is several DBs and still works great.

    can't quite put my finger on this quirk.

  5. #5
    mejia.j88 is offline Competent Performer
    Windows 7 32bit Access 2007
    Join Date
    Nov 2011
    Location
    california
    Posts
    228
    not sure if this might help answer my question but,

    on my switchboard i have two buttons, Enter record, and Browse recrods.

    browse records has no problems what so ever, and works great, (in fact, it's an exact copy of Enter record except it doesnt save records to the DB, only use is for browsing and printing old records).

    if i click Enter Record, then hit the save and print record, the error i posted earlier appears.
    upon closing this form, and going to the browse records, then back to the Enter record form, it works great after that.

    strange?

  6. #6
    mejia.j88 is offline Competent Performer
    Windows 7 32bit Access 2007
    Join Date
    Nov 2011
    Location
    california
    Posts
    228
    as silly as this may seem,
    i just tabbed my code over after Private Sub, on both of the event procedures and it worked.

    MSAccess is a mystery.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Object doesn't support property or method
    By Jamy in forum Programming
    Replies: 7
    Last Post: 07-15-2013, 01:42 AM
  2. Replies: 6
    Last Post: 11-18-2011, 03:46 PM
  3. Object does not support this method or property
    By Vronsky in forum Programming
    Replies: 5
    Last Post: 05-30-2011, 02:09 PM
  4. Replies: 9
    Last Post: 05-19-2011, 12:08 PM
  5. object or class does not support the set of events
    By couch potato in forum Programming
    Replies: 2
    Last Post: 03-20-2010, 08:55 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums