dbTalk Databases Forums  

Change splash screen on forward date

comp.databases.ms-access comp.databases.ms-access


Discuss Change splash screen on forward date in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Yvonne
 
Posts: n/a

Default Change splash screen on forward date - 05-31-2012 , 02:42 PM






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

Reply With Quote
  #2  
Old   
Patrick Finucane
 
Posts: n/a

Default Re: Change splash screen on forward date - 05-31-2012 , 02:52 PM






On May 31, 2:42*pm, Yvonne <letshav... (AT) gmail (DOT) com> wrote:
Quote:
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
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

Reply With Quote
  #3  
Old   
Yvonne
 
Posts: n/a

Default Re: Change splash screen on forward date - 06-01-2012 , 01:01 PM



Quote:
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

Reply With Quote
  #4  
Old   
Patrick Finucane
 
Posts: n/a

Default Re: Change splash screen on forward date - 06-01-2012 , 01:27 PM



On Jun 1, 1:01*pm, Yvonne <letshav... (AT) gmail (DOT) com> wrote:
Quote:
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
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.

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.