locked
Add from Outlook macro doesn't work in a subform RRS feed

  • Question

  • Hi, I created a subform/form first and then added the command button to the subform in the opened main form.  From the main form, the button doesn't do anything.  However, when I open up the actual subform the button works perfectly.  Any ideas?
    Monday, April 22, 2019 5:09 PM

All replies

  • Hi. Can you show us the code behind the button? Are you saying you're not getting any error message or any message at all?
    Monday, April 22, 2019 5:30 PM
  • Hello! That is correct, there is no error, just noting happensIt's a "simple' macro copied from the project management Microsoft template.

    On click

    onError

    Go to Next

    RunMenuCommand

    Command AddContactFromOutlook

    If code is the only way, I'm not opposed to that I just wouldn't know where to start!

    Monday, April 22, 2019 5:44 PM
  • Hello! That is correct, there is no error, just noting happensIt's a "simple' macro copied from the project management Microsoft template.

    On click

    onError

    Go to Next

    RunMenuCommand

    Command AddContactFromOutlook

    If code is the only way, I'm not opposed to that I just wouldn't know where to start!


    Hi. I think the reason why you're not getting any error messages is because of the onError Go to Next commands. Try removing them out to see if you get any messages then.
    Monday, April 22, 2019 6:23 PM
  • Okay, I cleared it out and got the error "the command or action "addfromoutlook" isn't available now

    You may be in a read only database (nope) or unconverted dababase from an earlier version of dbname (I don't believe so but not sure how to tell)

    The type of object the action applies to isn't currently selected or isn't in the active view.

    Use only those commands and macro actions that are currently available for this database.  I

    It works fine in the actual form, just not the subform.

    Monday, April 22, 2019 7:07 PM
  • Okay, I found a work around!  I just added a button to the main form to open the contacts subform (that has the button).  It works that way!!! Thank you for your assistance!
    Monday, April 22, 2019 7:28 PM
  • Hi it actually didn't resolve it because I can't get the record to open to a new correlated ID to the main record.  If you have further ideas, please let me know!
    Monday, April 22, 2019 8:08 PM
  • Okay, I found a work around!  I just added a button to the main form to open the contacts subform (that has the button).  It works that way!!! Thank you for your assistance!
    Can you post the code for this new button? Thanks.
    Monday, April 22, 2019 8:38 PM