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

后端 未结 6 1176
孤独总比滥情好
孤独总比滥情好 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条回答
  •  梦毁少年i
    2021-01-21 02:39

    You might like to consider a start-up form ("information"). This will show without macros.

    In addition, you can run some start-up code or a macro that closes the information form and opens the main form ("start menu"), if macros are disallowed, this will not run. However, I think you may get an unsightly warning.

    EDIT

    Set the timer interval to say, 100 and add a little code to Information form:

    Private Sub Form_Timer()
       DoCmd.Close acForm, "Information"
       DoCmd.OpenForm "start menu"    
    End Sub
    

提交回复
热议问题