How to force user to deal with the Security Warning when starting Access 2007?

后端 未结 6 1170
孤独总比滥情好
孤独总比滥情好 2021-01-21 01:41

When a user start an Access 2007 database that have macros and vba, a security warning is shown. I want the user to deal with this warning, so if the the content is\'t enabled,

6条回答
  •  情歌与酒
    2021-01-21 02:34

    Just to add my solution -- I was just dealing with this issue.

    By default, in database options have it set to open with form "notEnabled" On this "not enabled" form, have some text, pictures, or what have you that lets the user know that he/she needs to 'enable content'.

    In the on load event for this form, just put some VBA to open the actual form you want the user to be presented and close the "notEnabled" form.

    This way, if the user opens the database without making it trusted, enabling content, they are stuck on the form that tells them how to do that. As SOON as it's trusted, the on-load event of the form will fire and redirect the user to whichever form you want, with content enabled.

    If the user opens the database and already has trusted the file, they don't see the form telling them to make it trusted.

提交回复
热议问题