On 15 Sep 2003 08:57:49 -0700 in comp.databases.ms-access,
pl************@yahoo.com (Brian) wrote:
Hi there,
I am trying supress an error meesage that is raised if an Access
report fails during the hours of 7pm to 8am. I would assume that the
NOW function would be used to achieve this somehow(Something to the
effect of 'If Now > 7:00 pm then..." etc., but I can't figure out the
exact syntax. Has anyone else done this successfully before? Thanks
in advance.
DateTime constants use # around them, e.g. if now > #19:00:00# however
this will be thwarted by the date part missing as the above will
always be true as that time occurred on 30 Dec 1899. If I were you I'd
use:
If Hour(Now) > 19 Then...
--
A)bort, R)etry, I)nfluence with large hammer.
(replace sithlord with trevor for email)