Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Change splash screen on forward date

21 views
Skip to first unread message

Yvonne

unread,
May 31, 2012, 3:42:45 PM5/31/12
to
I'm a relative newbie but have developed several Databases at our
organisation. Because of a forthcoming reorganization, there is a need
to change the first screen ( what I call splash screen) on a pre-
determined date. The splash screen is displays the DB name, version
and contact details for support etc.

Is there a way to create an autoexec to change the current splash
screen to a different one on a date in the future?

Thanks
Yvonne

Patrick Finucane

unread,
May 31, 2012, 3:52:25 PM5/31/12
to
You could create a code module routine. In your autoexec call a
RunCode to run your routine name; ex: SplashForm

Public Sub SplashForm()
If Date() < #7/4/2012 then
Docmd.OpenForm "SplashFormCurrent"
Else
Docmd.OpenForm "SplashFormJuly4th"
End Sub

Yvonne

unread,
Jun 1, 2012, 2:01:01 PM6/1/12
to

>
> You could create a code module routine.  In your autoexec call a
> RunCode to run your routine name; ex: SplashForm
>
> Public Sub SplashForm()
>    If Date() < #7/4/2012 then
>        Docmd.OpenForm "SplashFormCurrent"
>   Else
>        Docmd.OpenForm "SplashFormJuly4th"
> End Sub

I'm a bit new to writing modules but I created ths:-

Public Function Splash() As Boolean

If Date < #12/2/2012# Then
DoCmd.OpenForm "frmSplash"

Else
DoCmd.OpenForm "frmSplash2"

End If
End Function

And in the autoexec I had a line o "RunCode" and it failed with.

"The expression you entered has a function name that "MyDatabase"
can't find"

Can you point me in the right direction again please.
Yvonne

Patrick Finucane

unread,
Jun 1, 2012, 2:27:07 PM6/1/12
to
Hmmmm...I modified your code for testing
Public Function Splash() As Boolean
If Date < #12/2/2012# Then
MsgBox "Splash1"
Else
MsgBox "Splash2"
End If
End Function

I placed the above code in a Module. Not a code module behind a form
or report...a code module. IOW, select Modules and either create a
new code module or open an existing module in design mode.

I created a macro called Macro1. I selected RunCode and in the
FunctionName box (I am using A2010) I entered Splash()

Then I saved and ran Macro1. If it worked, I'd then rename Macro1 to
Autoexec.
0 new messages