Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to Min. Database and Open Form automatically

Status
Not open for further replies.

LokiOfGameSlave

Technical User
May 1, 2002
36
CA
Ok, I have seen this done with the Sample Databases that comes with MS Access (97), but even after I looked at the code I can't for the life of me figure out how to do it.

When I open the database (currently called db1), I would like the database to automaticaly minimize and the form (currently called Main) to open up.

Can anyone post the code to use that would do this?

Thanks in advance,
-Loki Pronunciation: 'lO-kE
Function: noun
Etymology: Old Norse
Definition: a Norse god who contrives evil and mischief for his fellow gods
 
This is done with the AutoExec macro. This is a keyword module. If there is an AutoExec macro then ACCESS executes the commands. If not, then it just opens to the database design window.

Normally, I create an AutoExec that does a couple of things.
1. RunCommand WindowHide
2. OpenForm FormName

I don't minimize the database window because Users could just maximize and be into your tables and such. I Perform the WindowHide which makes in invisible. Upon closing the main form you have to UnHide the database to get back to design window again.

I hope this helps you.

Bob Scriver
 
Well, this is for a friend of mine and once I give it to him he won't ever access the Design View so it is a moot issue. :)

I will try to fiddle around with those commands you said would work and see if I can get it to work for me.

Thanks. Pronunciation: 'lO-kE
Function: noun
Etymology: Old Norse
Definition: a Norse god who contrives evil and mischief for his fellow gods
 
If you go to Tools/Startup, you can select the "Display Form" which will display at startup and you can uncheck "Display Database Window" which will hide the database window at startup.

This is the quick and easy way, especially since you are giving it to a friend.
 
Prize goes to kmcguiness for this one. Thanks m8.

Even simpler...and trust me, today simpler is better for me. :)

Thanks to the both of you for your help. I freaking LUV these forums. :D Pronunciation: 'lO-kE
Function: noun
Etymology: Old Norse
Definition: a Norse god who contrives evil and mischief for his fellow gods
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top