Time

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
 
B

Beetle

If DatePart("h", Me.Time1)>=12 And DatePart("h", Me.Time1)<16 Then
Me.GoodAfternoonMessage.Visible = True
End If
 
J

John W. Vinson

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.
 
A

a a r o n . k e m p f

wow it sounds to me like you're going through a lot of work to kick
people out of Access so that you can run a compact and repair.

at this point- you should move to SQL Server which supports
'autoshrink' out of the box-- it just works
 
D

Dominic Vella

Actually, can you stop bagging MS-Access? I'd rather you move out of this
Newsgroup and go where your SQL Server comments are appreciated.

I believe MS-Access is a phenominal product and best of all, cheaper to
setup and maintain. Requires no large costs for purchasing additional
Hardware/Software and Technical Support is cheaper too.



message
wow it sounds to me like you're going through a lot of work to kick
people out of Access so that you can run a compact and repair.

at this point- you should move to SQL Server which supports
'autoshrink' out of the box-- it just works
 
A

a a r o n . k e m p f

sorry but you're wrong.
Jet corrupts.

SQL Server is cheaper to setup and maintain

SQL Server requires no tech sipport.

INSTALL, NEXT, YES, NEXT you cannot follow the onscreen installer/?
 
A

a a r o n . k e m p f

I just think that it's funnny that you have to kick people out -- end
of day- so that you can run a compact and repair.. and you blame ME?

JET SUCKS
 
P

posted_by_anonymous

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
 
P

posted_by_anonymous

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.
 
Top