Solved Hiding a Form (1 Viewer)

theDBguy

I’m here to help
Staff member
Local time
Today, 15:11
Joined
Oct 29, 2018
Messages
21,358
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

MVP / VIP
Local time
Today, 22:11
Joined
Jan 14, 2017
Messages
18,186
Yes of course that's the case. I thought that was implicit in my comment,
 

theDBguy

I’m here to help
Staff member
Local time
Today, 15:11
Joined
Oct 29, 2018
Messages
21,358
Yes of course that's the case. I thought that was implicit in my comment,
Just checking... Thanks!
 

Pac-Man

Active member
Local time
Tomorrow, 03:11
Joined
Apr 14, 2020
Messages
408
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.
 

Pac-Man

Active member
Local time
Tomorrow, 03:11
Joined
Apr 14, 2020
Messages
408
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

Top Bottom