Results 1 to 6 of 6
  1. #1
    Jerry Call is offline Advanced Beginner
    Windows 10 Office 365
    Join Date
    May 2020
    Location
    Champaign, Illinois
    Posts
    85

    Error message: The expression On Open you entered as the event property setting produced the follow

    If you examine my database I sent you earlier you'll see I have four basic forms for entering Catalogue data:
    frmCoffeeCatalogue, frmSuppliesCatalogue, frmSodaCatalogue, and frmSnacksCatalogue.

    I began with the Coffee Catalogue form and set up some basic code in it which works perfectly
    as far as it goes. However, since I needed to add number of other features I decided to leave
    Coffee as it was but clone it under the name frmSodaCatalogue. In the latter I have added
    many, many new things. Many of them work fine, but to my amazement I find I get one
    error message (the one above) whenever the On Open event runs.

    Now the code for On Open is very simple. If you look at it in frmCoffeeCatalogue you'll
    see that all it does is set the width of the form.

    I have exactly the same code at the same place in frmSodaCatalogue. However, it throws
    the error. I'm having trouble making any sense of Microsoft's cryptic error messages,
    and this one has me by the throat.

    Here's the whole thing (wasn't able to get it all in above): "The expression On Open
    you entered as the event property setting produced the following error: Procedure
    declaration does not match description of event or procedure having the same name."

    I certainly can't find a singe additional reference to the On Open code anywhere in
    any of my other code in frmSodaCatalogue. There is no "other procedure having
    the same name" anywhere in frmSodaCatalogue. Just the form's On Open event
    which sets width.

    Up until recently this code worked fine in my enhanced frmSodaCatalogue. I'm
    trying to figure out what could have changed.

    Maybe I'll have to send you an updated database version so you can compare
    the On Open code of frmCoffeeCatalogue with frmSodaCatalogue. But before
    I do that I thought I'd see if somebody there has a bright idea what could be causing
    the problem off the bat. In plain English, what is this bloody error message


    telling us??

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,956
    I opened form in your db and don't get any error. So if there are changes after that version, need to see code.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,527
    Did you check the vb references? Alt-F11, tools , references. See if anything checked is marked MISSING.

    also, sometimes a control on the form has an incorrect setting.

  4. #4
    Jerry Call is offline Advanced Beginner
    Windows 10 Office 365
    Join Date
    May 2020
    Location
    Champaign, Illinois
    Posts
    85
    Well, I checked the dependencies area. Under Objects that I depend on I find, under "Tables," there are two items. One is tblSoda, and that's what I expect.
    The other (aha!) is "MISSING frmSodaCatalogue."

    But how can frmSodaCatalogue be missing? I can see frmSodaCatalogue in front of me in the Navigation screen, although it throws the error if you try to open it.
    I did clone it a little while ago and then renamed it to the correct name. Maybe that's where the trouble occurred. But how to fix what's wrong?

  5. #5
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2016
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,740

  6. #6
    Jerry Call is offline Advanced Beginner
    Windows 10 Office 365
    Join Date
    May 2020
    Location
    Champaign, Illinois
    Posts
    85
    Give me a couple more days and I'll send you the current version of my database.
    Right now I'm attempting to reconstruct frmSodaCatalogue from a cloned version
    of frmCoffeeCatalogue. So far Soda is coming up and working OK as I had new
    features, but there will be quite a few more things in Soda than in Coffee because
    I'm not going to clone the remaining three incomplete forms until I've got Soda
    so that it's ready to run.

    So for now go ahead and close out this string. But as Arnold Schwarzenegger
    says: "I'll be back!"

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

Similar Threads

  1. Replies: 0
    Last Post: 06-29-2019, 10:39 PM
  2. Replies: 21
    Last Post: 07-26-2018, 11:50 AM
  3. Replies: 10
    Last Post: 03-22-2018, 01:37 AM
  4. Replies: 18
    Last Post: 12-15-2016, 02:17 PM
  5. Replies: 7
    Last Post: 05-08-2014, 10:34 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