Results 1 to 6 of 6
  1. #1
    Sparkydog is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jan 2018
    Posts
    18

    Event Procedure Works on Form Until It Becomes a Subform

    Hello all - my first post on the forum! I have tried searching first but since I don't really know what is causing my problem I doubt I put the correct search terms in... so:

    I have an double click event procedure that works OK on a form when the form is used "stand alone" aka by itself.
    Click image for larger version. 

Name:	JobPopup1.JPG 
Views:	13 
Size:	111.3 KB 
ID:	32449

    But when I place this form as a subform within another, the popup event does not work and gives me this message.
    Click image for larger version. 

Name:	JobPopup2.JPG 
Views:	13 
Size:	68.9 KB 
ID:	32450

    And when I hit the Cancel button this is what I see.
    Click image for larger version. 

Name:	JobPopup3.JPG 
Views:	13 
Size:	21.5 KB 
ID:	32451

    And for reference here is the code of the event procedure.


    Click image for larger version. 

Name:	JobPopup4.JPG 
Views:	13 
Size:	28.7 KB 
ID:	32452

    And here is the way the query that runs the popup looks:
    Click image for larger version. 

Name:	JobPopup5.JPG 
Views:	13 
Size:	24.4 KB 
ID:	32453

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    because its no longer there. (as standalone)
    the path is now like:
    forms!masterform!subform!form!job

    use the builder to get the path correct!

  3. #3
    Sparkydog is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jan 2018
    Posts
    18
    I have/did/do use builder but the screenshot shows that it does not seem to know there is a subform option in the command line and therefore the builder does not show the field names as options. But I went ahead and just typed the path using your recommendation and it still does not work. And I have tried a few variations on the form name and it still doesn't work. Same error message as before but with the new command path.
    Click image for larger version. 

Name:	JobPopup6.JPG 
Views:	14 
Size:	85.5 KB 
ID:	32455

  4. #4
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    Too many form names - remove "subform"

  5. #5
    Gicu's Avatar
    Gicu is offline VIP
    Windows 8 Access 2013
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,250
    Quote Originally Posted by Sparkydog View Post
    I have/did/do use builder but the screenshot shows that it does not seem to know there is a subform option in the command line and therefore the builder does not show the field names as options. But I went ahead and just typed the path using your recommendation and it still does not work. And I have tried a few variations on the form name and it still doesn't work. Same error message as before but with the new command path.
    Click image for larger version. 

Name:	JobPopup6.JPG 
Views:	14 
Size:	85.5 KB 
ID:	32455
    try this [Forms]![Master Form]![Backlog 7Day]![job]

    Cheers,
    Vlad

  6. #6
    Sparkydog is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jan 2018
    Posts
    18
    Yay! It was that and I had the word "form" in the name of my subform. After fixing both items it works! Thank you very much!

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

Similar Threads

  1. Form Event Procedure ->Populate Table
    By Ganymede in forum Programming
    Replies: 3
    Last Post: 01-07-2016, 05:10 PM
  2. Replies: 8
    Last Post: 04-23-2015, 06:12 AM
  3. Replies: 5
    Last Post: 04-21-2014, 12:18 PM
  4. Form Event Procedure
    By Jgk in forum Forms
    Replies: 7
    Last Post: 03-30-2014, 04:31 PM
  5. Replies: 1
    Last Post: 03-29-2014, 07:46 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