Solved Hiding a Form (1 Viewer)

theDBguy

I’m here to help
Local time
Today, 13:52
Joined
Oct 29, 2018
Messages
10,713
I was also surprised to see that the startup form loaded first. I modified your code to use an event procedure instead of an embedded macro. Same result. Normally you would either use start up code in an autoexec macro OR in a startup form, not both!
Autoexec is useful where you need to ensure 'safe' code runs even if an application is opened when it hasn't been trusted
@isladogs If the startup form uses vba and hasn't been trusted, I think you will only see the autoexec macro fires.
 

isladogs

CID Moderator
Staff member
Local time
Today, 21:52
Joined
Jan 14, 2017
Messages
13,386
Yes of course that's the case. I thought that was implicit in my comment,
 

abdullahkhan

Member
Local time
Tomorrow, 01:52
Joined
Apr 14, 2020
Messages
146
In a business environment, you will rarely run into people who try to hack the database. But, you should still use some standard protection against accidental damage and the .accde does that.
Thanks, got the point. And thank you all for your responses.
 

abdullahkhan

Member
Local time
Tomorrow, 01:52
Joined
Apr 14, 2020
Messages
146
Autoexec is useful where you need to ensure 'safe' code runs even if an application is opened when it hasn't been trusted
Noted with thanks. I'm going to use only one. But to show the run priority in the db attached in former post, I used both.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top Bottom