2

I have a home form that automatically opens up to provide the user of my Access database navigation and a few other services, however, a lot of what the home form does, is heavily reliant on VBA, so unless the user has accepted the security warning, things will break.

To work around this, I have hidden everything on the form except for a label telling the user that they need to enable Macros in the Security Panel. Once the user does this, the form is obviously re-loaded, and VBA code will run on_load, showing all the buttons, and hiding the label.

However, occasionally I will open up the database, and all the buttons will be visible, and the warning label hidden, before I check the security warning. If I open them up in design view, the visibility property of each object is opposite of what I originally set it as, and I have to go reset it. I haven't been able to reproduce this error on command, but it happens reasonably regularly, without any kind of pattern that I have noticed. There are a few other forms which also have changes in their layout, and it occasionally happens to them as well.

I'm wondering if this is a problem anyone else has faced, and if so, what may have caused it.

John Saunders
  • 160,644
  • 26
  • 247
  • 397
SCB
  • 5,821
  • 1
  • 34
  • 43
  • Not exactly and answer, but this may be the way to go: http://stackoverflow.com/questions/1852215/how-to-force-user-to-deal-with-the-security-warning-when-starting-access-2007 – VBlades Jul 20 '14 at 23:33
  • Just curious - is this an upgraded database (Access 2003 to 2007, etc)? Also is it .mdb? – Mark C. Jul 20 '14 at 23:35
  • @OverMind - No, created from scratch in Access 2007, .accdb file type. – SCB Jul 21 '14 at 00:18

1 Answers1

2

This can be caused by:

  1. Opening the database
  2. Enabling macros
  3. Switching your home form to Layout View
  4. Making any kind of design change
  5. Closing the form and saving changes

The change of visibility from your VBA is locked in when you save changes from Layout View.

Could this be what is happening?

  • Thank you, it looks like that's what does it. I guess it means I'll just have to be careful with Layout view in the future. At least this means it won't be a problem that could come up when the database is finally published. – SCB Jul 23 '14 at 23:34