• Error with VBE Password (XP)

    Author
    Topic
    #433658

    Hi, I have an application that allows users toclone and edit reports, in this case delegate badges. If I set a VBE password to protect my code, I get an error when this line runs – DoCmd.CopyObject , stNewDocName, acReport, stDocName – any ideas how I can get around this? Thanks

    Viewing 0 reply threads
    Author
    Replies
    • #1020576

      One option is to make sure that the reports have no code module. You’d have to move event procedures to a standard module, change them to public functions instead of private subs, and refer to the report as CodeContextObject instead of Me. You can then use expressions such as =MyFunction() instead of [Event Procedure] in the Event tab of the Properties window. Finally, set the Has Module property of the report to No.

    Viewing 0 reply threads
    Reply To: Error with VBE Password (XP)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: