14
How to create a Splash Screen in MS Access Carlos Coronel

How to create a Splash Screen in MS Access Carlos Coronel

Embed Size (px)

Citation preview

How to create a Splash Screen

How to create a Splash Screenin MS AccessCarlos Coronel

Create the graphicMost splash screens have some type of graphic background with text.You cold use any graphics program to create this graphic.We would use PowerPoint and then save the slide as a JPEG file.

Using PPT to create a graph

Added a logo imageSelected a DesignAdded Text

Save PPT as JPEG

Used the Save As, Other Formats option to save the slide as a JPEG file.You should also save the ppt file for future editing purposes.Saved as AboutBox.jpg

What you need to do in MS AccessCreate a form in MS Access (frmStartup) Add the Image you just created (AboutBox.jpg)Set the forms Timer Interval property to a value in milliseconds (1000 equal 1 second). This is the time the form will show up on the screen and then run the macro you specify in On Timer property.In the forms On Timer property, create a macro that will automatically execute when the timer interval. The macro will close the frmStartup form and open the main menu form. Finally, we will setup MS Access to automatically open the frmStartup when opening the database file.

Create a form in MS Access

1. Create a form in MS Access (frmStartup). 2. Add the Image you just created (AboutBox.jpg)frmStartupNo headerNo footerAdd image

Set the Timer Interval

3. Open the form properties. 4. Set Timer Interval Property. In this case is set to 4 seconds. The form will wait four seconds and then execute the macro specified in the On Timer property.Set Timer Interval frmStartupForm Properties

Creating Macro to execute on timer

3. In the On Timer property set, create the macro you want to run. Click on the 4. Click on Macro Builder, The Macro Tools window will openOn TimerfrmStartupForm Properties

Macro Action: Close frmStartup form5. Enter the macro name: StartupTimer. We want the macro to close the frmStartup and open the main menu form (frmMainMenu)6. First, we need to close the frmStartup form. Under Add New Action, select CloseWindow action then, enter the parameters: Object Type is Form; Object Name is frmStartup; Save is No.Submacro StartupTimerThe macro starts with the first action on the next line.The macro executes each action until the End Submacro line. In this case, the macro executes the CloseWindow and OpenForm actions and then stops.This macro has two actions

Macro Action: Open frmMainMenu 7. Next, we create an action to open the frmMainMenu form.8. In the next line: Under Add New Action, select OpenForm. Arguments: Form Name is frmMainMenu; View is Form; Window Mode is Normal9. Close the macro window and the form design window will appear again.

Setting On Timer to execute macro

10. In the On Timer property make sure the macro name you created is there. If you created an embedded macro it will say [Embedded Macro]We are now ready to test this macro. Save and close the form.On TimerfrmStartupForm Properties

Testing the frmStartup formDouble click on frmStartup.The from will show up on the screen, wait four seconds (or whatever you entered), then execute the StartupTimer macro.

Macro opens the frmMainMenuThe StartupTimer macro closes the frmStartup and opens the frmMainMenu.Now that we know it works, we just need to add the frmStartup to automatically open when you open the database.

Set form to open automaticallyIn MS Access, click on the File tab, then Options, Current Database. In the Application Options section, in Display Form:, select frmStartup. Click Ok. Done!

Set form to open