Time

  • Thread starter Thread starter Secret Squirrel
  • Start date Start date
S

Secret Squirrel

I have a splash screen that shows for 5 seconds when the DB is open. What I'm
trying to do is have it show a message when it's a certain time of day. I
have this set up in the open event of the form but it doesn't seem to be
working. Is this the correct syntax to have it look at the time in my control
called "Time1"?

If Me.Time1 > "11:59" And Me.Time1 < "16:00" Then
Me.GoodAfternoonMessage.Visible = True
Else

End If
 
If DatePart("h", Me.Time1)>=12 And DatePart("h", Me.Time1)<16 Then
Me.GoodAfternoonMessage.Visible = True
End If
 
I have a splash screen that shows for 5 seconds when the DB is open. What I'm
trying to do is have it show a message when it's a certain time of day. I
have this set up in the open event of the form but it doesn't seem to be
working. Is this the correct syntax to have it look at the time in my control
called "Time1"?

If Me.Time1 > "11:59" And Me.Time1 < "16:00" Then
Me.GoodAfternoonMessage.Visible = True
Else

End If

Date/Time values are not text strings, they're numbers. I'd suggest using the
builtin Time() function - which looks at the PC's system clock - rather than
going via a form control; e.g.

<set all the controls to invisible>
Select Case Time
Case < #12:00#
Me.GoodMorningMessage.Visible = True
Case < #16:00#
Me.GoodAfternoonMessage.Visible = True
Case Else
Me.GoodEveningMessage.Visible = True
End Select

The form's Load event would be more suitable - the Open event fires before the
controls are instantiated.
 
Maybe people blame YOU for repeatedly jumping in to threads about Access and
repeatedly lying to spam for SQL Server -- did that ever occur to you? If
not, you are even dumber than you show yourself to be.

TROLL AARON SUCKS
 
a a r o n . k e m p f @ g m a i l . c o said:
sorry but you're wrong.

But not as wrong as you.
Jet corrupts.

SQL Server corrupts, too.
SQL Server is cheaper to setup and maintain

That is an outright lie. Jet is automatically installed with Access (no
fuss, no muss, no bother). And you need Access to do your UI for SQL Server
anyway, because SQL Server provides no user interface nor development tool.
SQL Server requires no tech sipport.

If you meant to type "tech support", then that, too, is an outright lie.
Like all server databases, SQL Server in all its editions requires the tender
loving care of a database administrator. Jet, on the other hand, just needs
a user to do a Compact once in a while.
INSTALL, NEXT, YES, NEXT you cannot follow the onscreen installer/?

To install the product, easy as most Server DBs. To create a database for a
particular application... someone with database administrator has to set up a
new database, define the tables, define the relationships... ADPs let you do
_some_ of that from Access (you need Access anyway, even if you don't use
Jet), not all, but only trolls and the terminally stupid would initiate a new
project as an ADP, anyway.

With Jet or ACE, ANY user can just click New and type in the fields and go
on to auto-generate forms and reports and such. No database administrator
privileges needed, no setting up a separate database (y'wanna split to have a
separate, shared MDB or ACCDB database? there's a wizard).

There are liars, damn liars, and then there's damn lying SQL spammers in
Access newsgroups.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top