Results 1 to 15 of 15
  1. #1
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 10 Access 2013 32bit
    Join Date
    Feb 2011
    Posts
    1,919

    More problems with functions not found

    Some time ago, Baldy and I chased after the issue of functions not found: https://www.accessforums.net/showthread.php?t=58752
    I've hit almost the same problem again. I found some old threads where Marshal Barton and a couple of others are suspicious of broken references. Barton suggests manual inspection. Anyone know how to do that? (Can't even find Public Functions coded in a general module)

  2. #2
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,940
    Not even with a simple find?
    Attached Thumbnails Attached Thumbnails Find.PNG  
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  3. #3
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Office 365
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,977
    Do you mean broken references or broken functions?
    If references, then see Reference List & Locations (isladogs.co.uk)
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  4. #4
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 10 Access 2013 32bit
    Join Date
    Feb 2011
    Posts
    1,919
    Beyond a simple view within the object browser like seen here, I don't know what else Marshall would mean. And, as I view what I've clipped below, is there something I'm missing that tells me the reference is broken?
    Click image for larger version. 

Name:	000.jpg 
Views:	21 
Size:	152.8 KB 
ID:	47342Click image for larger version. 

Name:	001.jpg 
Views:	23 
Size:	10.7 KB 
ID:	47343

  5. #5
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,801
    You're showing the code and object browser windows. For references, you have to look into Tools>References and look for indications of problems. Missing ones are flagged as such.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  6. #6
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 10 Access 2013 32bit
    Join Date
    Feb 2011
    Posts
    1,919
    Do you mean broken references or broken functions?
    Before I even posted, I looked at the references, and seeing nothing out of the ordinary had concluded that Marshall Barton was referring to some other kind of reference. All I can say about it in referenced to your question is that I have Shortcut menus that when used raise runtime errors to the effect that Access can't find the referenced functions. These, of course, are my functions not to be confused with functions found in the reference libraries.
    Click image for larger version. 

Name:	Ref0.jpg 
Views:	23 
Size:	77.1 KB 
ID:	47344

    From a methodology point-of-view, when I create a new version of my app, I begin the process by creating a new DB and then copy ALL the elements from the previous version so as to have a starting point for the app's changes. Maybe that approach doesn't properly handle the inclusion of menus, even though that box is checked? NONE of the shortcut menus have been altered for quite some time, maybe 3 or 4 versions ago.

  7. #7
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Office 365
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,977
    Quote Originally Posted by GraeagleBill View Post
    From a methodology point-of-view, when I create a new version of my app, I begin the process by creating a new DB and then copy ALL the elements from the previous version so as to have a starting point for the app's changes. Maybe that approach doesn't properly handle the inclusion of menus, even though that box is checked? NONE of the shortcut menus have been altered for quite some time, maybe 3 or 4 versions ago.
    When you do that object import into a new database, make sure you click the options button and tick all the checkboxes

    Click image for larger version. 

Name:	Capture.PNG 
Views:	20 
Size:	14.9 KB 
ID:	47347
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  8. #8
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,801
    Haven't used custom commandbars and shortcut menus for a long time, but IIRC calls have to be functions and the functions are supposed to be in standard modules, not form/report modules. A shortcut menu is just a type of commandbar, so maybe code location is the problem. That's all I can think of, because I have no doubt that you've got spelling covered.

    However, if your issue is about code for control events, I've never tried to put them in standard modules. I would not think the code is visible to a form/report or any of its controls. Why put a command button click in a standard module as you are doing?
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  9. #9
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 10 Access 2013 32bit
    Join Date
    Feb 2011
    Posts
    1,919
    IIRC calls have to be functions and the functions are supposed to be in standard modules
    I think the troublesome app is almost as old as I am. I think it might even have been originally created in A2000. Its users have been running the mde modules in A2007, A2010 and A2013 environments for quite some time. It has to be some sort of version migration fluke, as all the users have been using the right-click options successfully where only 2 of the 9 options on the popup menu have their Public Functions coded in general modules, the other 7 are coded in the form's module.

    The current situation is unacceptable, a situation I would normally refer to as a "snake in the grass" waiting to attack! With that, I will kill it now. (A reasonable command/option list in the form's UI plus a AltMask in the Mouse Down event where the record ID is needed should do the trick.) Perhaps obviously, I'm not a fan of ribbons and I wish MS would have continued regular support of the popup menus.

  10. #10
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,801
    You can still code popup menus IIRC. More trouble than they're worth these days, I think. To reiterate, I believe these have to be functions in a standard module, but I'm not sure you got the gist of my notion that you cannot put things like a control event anywhere outside of the object that contains it, and that's what I'm seeing in your post. Don't see hwo you can have a commandbutton click event code in a standard module. If I'm wrong, I just learned something (not that I'll ever use it). Such deviations tend to come back to bite after one or more application "updates".
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  11. #11
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 10 Access 2013 32bit
    Join Date
    Feb 2011
    Posts
    1,919
    You can still code popup menus IIRC
    I don't know what that means?

    you cannot put things like a control event anywhere outside of the object that contains it
    No, I didn't express my intent very well. What I mean is that the functionality within a given form will be handled by a command control within that form. Where a general module is involved, it will be called from within the "Form's MouseDown Event" where that event will have direct access to the record.

  12. #12
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,801
    I don't know what that means?
    Popup, right click, context - all the same to me. Any menu that's not a child of what we used to call commandbar, I guess. That includes menubar.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  13. #13
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 10 Access 2013 32bit
    Join Date
    Feb 2011
    Posts
    1,919
    Okay, I've just been calling such popups "shortcut menu" & "right-click menus". A2003 calls those menus "Shortcut".

  14. #14
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,801
    Lots of people call them context menus. The term was more prevalent years ago and you can find plenty of threads using the term. Not many of them seem to be written by M$, but maybe it came from this notion, which was written by M$ for as late as Access 2013.

    When you are designing a form or report, you may want to provide a method for a user to easily use a command that applies only to the current context.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  15. #15
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 10 Access 2013 32bit
    Join Date
    Feb 2011
    Posts
    1,919
    Since I have other apps that successfully use the right-click popup menus in A2013, the issue with the app of the OP is technically un-resolved. However, since I've elected to take a different approach to the functionality devoid of the popup, the current OP is effectively resolved. And, by the way, Micron is correct in that given the lack of support for shortcut menus after A2003, they're not worth the effort.

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

Similar Threads

  1. Replies: 4
    Last Post: 05-19-2021, 10:00 AM
  2. Functions
    By Khalil Handal in forum Modules
    Replies: 3
    Last Post: 06-02-2018, 02:22 PM
  3. Replies: 18
    Last Post: 11-09-2010, 02:39 PM
  4. Functions
    By Alex Motilal in forum Programming
    Replies: 2
    Last Post: 09-27-2010, 08:06 AM
  5. sum functions
    By trippers in forum Queries
    Replies: 2
    Last Post: 08-04-2010, 07:09 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