Results 1 to 2 of 2
  1. #1
    twgonder is offline Expert
    Windows 10 Access 2021
    Join Date
    Jun 2022
    Location
    Colombia
    Posts
    658

    Right click throwing an error when multiple or modal forms

    I've got right click working in forms, I cobbled it together from various forums and posts.
    Some things were wrong in those forums, and I've had to tweak things to work.
    In its simplest form, right clicking on a control opens the associated, second form for the data in the calling control and shows the record.

    A funny thing happens when I've got two forms open, and the second form is given another right click to call a function.
    It throws this error, but the problem is, it doesn't say what function it's looking for.



    Click image for larger version. 

Name:	230831Rcf1.jpg 
Views:	20 
Size:	116.3 KB 
ID:	50701

    The message is confusing, because there isn't an expression supporting the call, just the right click on the control. Is there a trick to see what's going on behind the scenes?

    I've got to admit, that even after reading all the MS helps, documentation, and even reading about five blogs on command bars, I'm still not sure how it all works or is supposed to work. Each form has its own command bar, because the function calls have to be unique. I'm going back over everything to see how a particular command bar gets "attached" to a form. As part of the debugging though, it would be nice to see what Access is looking for when it throws the error.

  2. #2
    twgonder is offline Expert
    Windows 10 Access 2021
    Join Date
    Jun 2022
    Location
    Colombia
    Posts
    658

    Demo .accdb of the problem

    I put together a little demo of the problem. Download, extract the attached Rcf1.accdb.

    1) Open FormB from the navigation pane, right click in the text box, click on Do Form C. See the message in the textbox, the function was found and ran fine.
    2) Close FormB
    3) Open FormA, right click in the text box, click on Do Form B. In FormB right click in the text box, click on Do Form C. You should see the error message described in post #1

    Why is the right click failing in step 3 for FormB when it ran fine in step 1?
    What is the error message trying to say?
    Should this be happening, or have I missed something?
    Attached Files Attached Files

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

Similar Threads

  1. Dir command throwing data missmatch error
    By Robyn_P in forum Programming
    Replies: 1
    Last Post: 06-27-2022, 08:58 AM
  2. VBA custom function throwing overflow error
    By catluvr in forum Programming
    Replies: 7
    Last Post: 10-15-2020, 12:06 PM
  3. Replies: 0
    Last Post: 07-30-2017, 08:27 AM
  4. Minimizing Modal forms
    By Lukael in forum Programming
    Replies: 4
    Last Post: 11-11-2015, 01:14 PM
  5. Replies: 3
    Last Post: 12-10-2013, 08:53 AM

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