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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

trying to remove access loadup screen and background 2

Status
Not open for further replies.

Zeroanarchy

Technical User
Jun 11, 2001
630
AU
hey all, on my start up I am running the following procedure, if I run this procedure straight from the module folder the menu that has:
file Edit View Insert Tools window Help
disapears, which is what I want it to do. But if i run the same module using RunCode under the startup Macro Autoexec it appears.
Can anyone tell me another way of getting rid of this menu as well as removing the access startup screen and the access background.

Public Function start()
Dim intX As Integer
Dim db As Database
Dim prp As Property
Set db = CurrentDb

Application.SetOption "Form Template", False
Application.SetOption "Show Hidden Objects", False
Application.SetOption "Show System Objects", False
Application.SetOption "Provide Feedback With Sound", False
Application.SetOption "Show Values Limit", 10000
Application.SetOption "Move After Enter", 1
Application.SetOption "Behavior Entering Field", 0
Application.SetOption "Arrow Key Behavior", 1
Application.SetOption "Show Status Bar", False
Application.SetOption "Default find/replace behavior", 1
DoCmd.ShowToolbar "Database", acToolbarNo
DoCmd.ShowToolbar "Filter/Sort", acToolbarNo
DoCmd.ShowToolbar "Form Design", acToolbarNo
DoCmd.ShowToolbar "Form View", acToolbarNo
DoCmd.ShowToolbar "Formatting (Datasheet)", acToolbarNo
DoCmd.ShowToolbar "Formatting (Form/Report)", acToolbarNo
DoCmd.ShowToolbar "Macro Design", acToolbarNo
DoCmd.ShowToolbar "Menu Bar", acToolbarNo
DoCmd.ShowToolbar "Print Preview", acToolbarNo
DoCmd.ShowToolbar "Query Datasheet", acToolbarNo
DoCmd.ShowToolbar "Query Design", acToolbarNo
DoCmd.ShowToolbar "Relationship", acToolbarNo
DoCmd.ShowToolbar "Report Design", acToolbarNo
DoCmd.ShowToolbar "Source Code Control", acToolbarNo
DoCmd.ShowToolbar "Table Datasheet", acToolbarNo
DoCmd.ShowToolbar "Table Design", acToolbarNo
DoCmd.ShowToolbar "Toolbox", acToolbarNo
DoCmd.ShowToolbar "Utility 1", acToolbarNo
DoCmd.ShowToolbar "Utility 2", acToolbarNo
DoCmd.ShowToolbar "Web", acToolbarNo
DoCmd.ShowToolbar "Visual Basic", acToolbarNo
DoCmd.OpenForm "Data"
Set prp = db.CreateProperty("AllowByPassKey", dbBoolean, False)
Set prp = db.CreateProperty("StartupShowDBWindow", DB_BOOLEAN, False)
Set prp = db.CreateProperty("StartupShowStatusBar", DB_BOOLEAN, False)
Set prp = db.CreateProperty("AllowBuiltinToolbars", DB_BOOLEAN, False)
Set prp = db.CreateProperty("AllowFullMenus", DB_BOOLEAN, False)
Set prp = db.CreateProperty("AllowBreakIntoCode", DB_BOOLEAN, False)
Set prp = db.CreateProperty("AllowSpecialKeys", DB_BOOLEAN, False)
intX = AddAppProperty("AppTitle", dbText, "My Program")
intX = AddAppProperty("AppIcon", dbText, "C:\Program Files\my.ico")
RefreshTitleBar
End Function
 
You can replace the Access startup screen with a custom bitmap of your own by naming the bitmap the same name as your .mdb file and putting it in the same directory. As far as hiding your toolbar, why not just write another 50 lines of code ...

Oh oh that was the evil tMan talking
 
tman138. I had a small peice of code not all that long a go that pulled the back down which ment my program was the only thing you could see. I believe it was a set option command.

In responce to the bitmap change will this change it pemenatly or only when my program is running ie. If I run northwind will my bitmap show up.

If not would appreatiate the code.

Thanks Zero
 
First: If all that code you have is to not show the Menu Bar, the following DoCmd will work. Put it in the On Open Event of your form. Make sure you have a close or exit command on your form. You will have to hold down the shift button while opening your program to get to the design view.

DoCmd.ShowToolbar "Menu Bar", acToolbarNo

Second: The following is from another thread. I have not used it. I thought you may be interested in it.

Question:
I would like my own splash symbol to come up when starting the data base and the access splash not showing.

Answer:
Access Splash screen shows itself, then closes so fast on newer faster computers that it's almost useless to try to incorporate it as something useful in your program. Access give us no control on how long the splash screen remains on the screen. So here is the best thing to do.

First open any graphic program that you can control the canvas size. Make a .bmp file that consists of one single pixel that is gray, adjust the canvas size to be 1 pixel x 1 pixel in size. Save this file as the same name as your .mdb file.

Example: If the Access file is named MyDb.mdb, then name the .bmp file to MyDb.bmp. This file must be placed in the same folder where the .mdb file resides.
This will basically make the default Access file invisible (almost, only one gray pixel).

Now to get a Splash screen that you can control: Build a form to emulate the splash screen, with all the bells and whistles you wish. Then set this form as the startup form in Access. In this form, use the On Timer event to open the next form. Use the Timer Interval to control how long you want the splash screen to remain open and when to open your next form.

I hope this explanation doesn't confuse you. It really is quite simple. You can reuse the .bmp file in any app by just copying the file and pasting it in the folder where you wish to use it, and rename it to the name of this different database. (remembering to retain the .bmp extension)

Good Luck!
Bocker
 
Bocker thanks 4 ur time on this I appreatiate it, the bitmap work really well thankyou. I am still having a prob with getting rid of the menu ( File Edit Insert records window help) this menu seems to come up regardless. I tried

DoCmd.ShowToolbar "Menu Bar", acToolbarNo

a found that the top menu still comes up.
Any ideas.
zero :)
 
I just tried the docmd in a program that did not have it, and it worked fine. Did you put the code into the on open event in the properties of your first form you are going to use. Not a splash screen form. I have put that code into other treads, and all seemed to say it worked great. Do you still have your other fuction and macro also active. If so, that could be causing some problem.
Are you using 2k or 2000?

Keep talking to me!!! We will get it to work.

Bocker

 
Bocker, ok this is what I have worked out so far, if the database windows is shown when you run codeDoCmd.ShowToolbar "Menu Bar", acToolbarNo the menu disapears but if the database window is hidden the menu will not go away.
running Access 97
 
ok I have put the code in several forms, and changed my boot up sequence and used the access startup instead of a procedure. I placed the code in the startup form and it does not remove the menu. If I go in behind the code eg. the backend and place the code into a form and run the form it does remove its self???

Any ideas.
 
You need to explain the order of what you are doing.
1. Do you have a splash form?
2. Are you closing the database window by code, or by startup
3. What is the first form you use, that you don't want the menu bar visible
4. How large is this database, could you email it to me?

Bocker
 
Yes, my docmd is in the form that I have come up first. Example I put the code in the main menu form. I have a splash screen that the code is not it.

I don't know what your startup form is?

Bocker
 
okay my startup form is a password form in which you have to log in. after password verification it opens a form called Autoexec. both form have the docmd. on bootup I have no customer menus what so ever. As mentioned the docmd does not do its job. I do notice that when it switches between form the menu drops to 3 option menu. but as soon as th new form opens it goes back to the standard ( File Edit Insert records window help).

I still have no idea as to why it does not work.

Thanks again for your help on this matter
Zero
 
Hey, I need to go to bed. I am not an expert on boot up procedure. I know if I click on my shortcut my splash screen comes up, and when my timer ends, my Main Menu comes up with out a Menu Bar.

Keep talking to me.
Good night
Bocker
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top