Page 2 of 3 FirstFirst 123 LastLast
Results 16 to 30 of 37
  1. #16
    lawdy is offline Competent Performer
    Windows XP Access 2010 32bit
    Join Date
    Jan 2013
    Posts
    172

    I closed my database and open a NEW blank database and created one form. I attached the code to a new module. I get the same error. Does that eliminate the corrupt database possibility? It is a very large database.

  2. #17
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    Provide that simple db. Let's see if it runs as is for me or if it also errors. Or is there another machine you can use? Maybe the Access install is the issue.
    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. #18
    lawdy is offline Competent Performer
    Windows XP Access 2010 32bit
    Join Date
    Jan 2013
    Posts
    172
    I am attaching 'RightClick' database for your analysis. My original database is very large. I created this one for your analysis. The code does not work on this one either. I appreaciate you held.
    Attached Files Attached Files

  4. #19
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    I removed the text from the form's Menu Bar property to avoid that error.

    I added reference to Microsoft xx Object Library using Tools>References

    I added code to call function behind a copy of the form

    I executed code

    I added the new object to the shortcut menu property in the copy of form.
    Attached Files Attached Files

  5. #20
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    Yes, had to add Microsoft Office 14.0 Object Library.

    I know you earlier stated you had selected it but for some reason it was not selected in the posted db.

    However, I get error when opening the form "Cannot find CreateSimpleShortcutMenu". Remove CreateSimpleShortcutMenu from the MenuBar property.
    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.

  6. #21
    lawdy is offline Competent Performer
    Windows XP Access 2010 32bit
    Join Date
    Jan 2013
    Posts
    172
    Ok, I must not know what it means to add Microsoft Office 14.0 Object Library. I have attached a pdf file of a picture of my existing reference library (this is my actual working database, not the little one I sent you). I went to 'TOOLS' then 'REFERENCES' and the picture is what it looks like. There must be something else that you are talking about. It does work in the one that was sent to me, but I can not duplicate it.
    Attached Files Attached Files

  7. #22
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    That looks like the right place. From the VBA editor: Tools > References. Now go down the list until you see "Microsoft Office 14.0 Object Library" - that EXACT wording.
    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.

  8. #23
    lawdy is offline Competent Performer
    Windows XP Access 2010 32bit
    Join Date
    Jan 2013
    Posts
    172
    If you look at the attachment ( on my previous post), it show that there is a check mark by 'Microsoft Office 14.0 Object Library'. But both of you said I do not have a reference to. What do I need to do?

  9. #24
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    Quote Originally Posted by lawdy View Post
    If you look at the attachment ( on my previous post), it show that there is a check mark by 'Microsoft Office 14.0 Object Library'. But both of you said I do not have a reference to. What do I need to do?
    In the DB you uploaded there is not a reference. There are two issues with the DB you uploaded. The first issue was getting the form to load. Fix that by clearing the MenuBar property, see post #20. The other error associated with the DB you uploaded is that it does not have a reference to the Object Library, see post #19.

    Address those two issues and then include a line of code to call the function to fix the DB you uploaded. Then you can compare the working "example DB" with your "production DB".

  10. #25
    lawdy is offline Competent Performer
    Windows XP Access 2010 32bit
    Join Date
    Jan 2013
    Posts
    172
    Please see the attachment. It is a picture of my original db reference liabary. There is a check mark by the object 'Microsoft Office 14.0 Object Library'. Does that mean there is a reference to it?
    Attached Files Attached Files

  11. #26
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    I do not see "Microsoft Office 14.0 Object Library" in that image. There are "Microsoft Access ..." and "Microsoft Outlook ..." and "Microsoft Office 14.0 Access database ..."
    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.

  12. #27
    lawdy is offline Competent Performer
    Windows XP Access 2010 32bit
    Join Date
    Jan 2013
    Posts
    172
    I am still getting the same error message. Where do I go now?

  13. #28
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    The modified database provided by ItsMe will not work for you?

    From here, I suggest you test on another computer. If that works, then reinstall Access on your first computer.
    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.

  14. #29
    amrut is offline Expert
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2012
    Location
    Dubai
    Posts
    614
    Experts are already helping you out. If want this menu permanently, then change the following line in your module
    Code:
     Set cmbShortcutMenu = CommandBars.Add("SimpleShortcutMenu", msoBarPopup, False, True)
    to
    Code:
     Set cmbShortcutMenu = CommandBars.Add("SimpleShortcutMenu", msoBarPopup, False, False)
    Then you have to never run the code again to build the menu and menu is always available unless you delete it.
    A temporary menu is deleted when the database is closed.

  15. #30
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    So you say the modified db provided by ItsMe works? Then should be able to do the same in your primary db. We can't offer any more advice without being able to analyse it ourselves.
    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.

Page 2 of 3 FirstFirst 123 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Print Preview Custom Shortcut Menu
    By Swatskeb in forum Modules
    Replies: 2
    Last Post: 05-22-2014, 08:02 PM
  2. create menu problem
    By jinz in forum Forms
    Replies: 1
    Last Post: 12-10-2012, 07:02 AM
  3. Unable to create new record in Forms
    By escapades_access in forum Forms
    Replies: 5
    Last Post: 03-16-2011, 03:23 PM
  4. Replies: 0
    Last Post: 01-27-2011, 09:58 AM
  5. custom shortcut menu help!
    By ninachopper in forum Access
    Replies: 5
    Last Post: 09-05-2010, 06:27 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