how to prevent access VBA from opening all classes (1 Viewer)

Hello1

Registered User.
Local time
Today, 07:15
Joined
May 17, 2015
Messages
271
A quick question...

Im opening my .accdb with the shift key and after that when I launch the VBA the VBA opens all my class objects and it takes some time.
I tried closing all of them and then close the .accdb and open it again. After that I opened the VBA again but again all the class objects open.
On some of my other .accdb I did the same and the class objects dont open when I launch VBA, what makes it load much faster and I open manually just the class object hich I need.
Is this the work of the shift key? But then how dont they open on some of my other .accdb, I also use the shift key there?

Thanks
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 21:15
Joined
Oct 29, 2018
Messages
21,453
On some of my other .accdb I did the same and the class objects dont open when I launch VBA, what makes it load much faster and I open manually just the class object hich I need.
Interesting. I couldn't duplicate this. I always get all the modules open even after I closed them. Can you tell any differences in the settings between your accdbs?
 

Hello1

Registered User.
Local time
Today, 07:15
Joined
May 17, 2015
Messages
271
Nope, I cant find any difference in settings. In fact earlier I achieved this on one of my .accde and then I wanted to do it on the same one just with different linked tables and I couldn't.
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 21:15
Joined
Oct 29, 2018
Messages
21,453
Nope, I cant find any difference in settings. In fact earlier I achieved this on one of my .accde and then I wanted to do it on the same one just with different linked tables and I couldn't.
I'll try to open as many files today as possible just to see if I can find one that behaves differently and let you know if I find anything.
 

Hello1

Registered User.
Local time
Today, 07:15
Joined
May 17, 2015
Messages
271
Alright, I found it out. After closing all the class objects, I just had to do a compile :banghead:

After that when I relaunch the .accdb the class objects dont open
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 21:15
Joined
Oct 29, 2018
Messages
21,453
Alright, I found it out. After closing all the class objects, I just had to do a compile :banghead:

After that when I relaunch the .accdb the class objects dont open
Ah, I can confirm this works. Thanks!
 

Hello1

Registered User.
Local time
Today, 07:15
Joined
May 17, 2015
Messages
271
Awesome, I will see to implement that.
Thanks
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 21:15
Joined
Oct 29, 2018
Messages
21,453
It's too bad there's no keyboard shortcut for that. Thanks!
Oh, I guess there is sort of one keyboard shortcut we could use for this. Just keep holding down Ctrl+F4 until all the windows are closed. Cheers!
 

isladogs

MVP / VIP
Local time
Today, 05:15
Joined
Jan 14, 2017
Messages
18,209
Oh, I guess there is sort of one keyboard shortcut we could use for this. Just keep holding down Ctrl+F4 until all the windows are closed. Cheers!

Easily done!
I have an autokeys macro that does exactly that.
I use CTRL+SHIFT+X but you can use anything you like.
Take care not to overwrite an existing Access keyboard shortcut



In fact I mentioned doing that in the link I provided :rolleyes:
 

Attachments

  • autokeys.PNG
    autokeys.PNG
    6.8 KB · Views: 149

Users who are viewing this thread

Top Bottom