Results 1 to 5 of 5
  1. #1
    Lou_Reed is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2015
    Posts
    1,664

    Error in subprogram

    This request is I believe quite simple. The attached file when you open form frmEmail it

    gives a Me.chkTicketAssigned error.

    The method is not found. But the method is the subprogram.

    It makes no sense that it fails internally here. The is the subprogram at the top of the VBA code for that
    form.

    Any help appreciated. Thanks in advance.

    Respectfully,




    Lou Reed
    Attached Files Attached Files

  2. #2
    jwhite is offline Competent Performer
    Windows 10 Access 2013 32bit
    Join Date
    Dec 2012
    Location
    North Carolina
    Posts
    349
    Confused... There is no control named "Me.chkTicketAssigned" on frmEmail. The error is occurring in the On Current event, advising "Me.chkNeeting_Invite" not found - this is not on the form either. There are no check boxes on the form.

  3. #3
    John_G is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    But the method is the subprogram.
    No, it's not. There is a subprogram called chkTicketAssigned_AfterUpdate, which from its name is the event code for the After Update event for a form control called chkTicketAssigned. However, there is no control called chkTicketAssigned on the form, and because Me.chkTicketAssigned is trying to refer to a non-existant control, you get an error.

    Under normal circumstances, you can't see or write code for methods - it's built in. If you write your own subprogram or function, then you don't reference it using Me. , you just use its name.


    PS - there are also syntax errors in the code module for that form.

  4. #4
    Lou_Reed is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2015
    Posts
    1,664
    You are right!

    That is why it is not working. I obviously took the source code from a working program and then just changed the name TicketAssigned. That is not enough.

    It is an after update event so that must be selected in event properties. That is why it is wrong. I will make those corrections now.

    The question is how does one put in an AfterUpdate event? It (AfterUpdate) seems to not to be a choice in data properties.

    So how too I get the first and last line of VBA code for an AfterUpdate event?

    Thanks for your input.

    Respectfully,

    Lou Reed

  5. #5
    Lou_Reed is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2015
    Posts
    1,664
    Never mind. I got the AfterUpdate event in the properties. I think that I can do this now.

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

Similar Threads

  1. Replies: 1
    Last Post: 09-22-2016, 05:05 AM
  2. Replies: 6
    Last Post: 03-17-2016, 02:10 PM
  3. Replies: 3
    Last Post: 01-23-2014, 07:49 AM
  4. Replies: 0
    Last Post: 07-16-2012, 05:42 AM
  5. Replies: 6
    Last Post: 05-30-2012, 12:32 PM

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