Are the time/country settings for both computers the same?

Signature
There's ALWAYS more than one way to skin a cat!
Answers/posts based on Access 2000
Marco Brilo - 29 Jan 2007 15:46 GMT
Do you mean under 'Date and Time' in Control Panel? I don't know where else?
She's left for a meeting now but will check when she gets back.
thanks
M
> Are the time/country settings for both computers the same?
Rather than relying on the date value be formatted in a specific way, why
not store the value in a Date variable, and then compare it to
#28-Nov-1981#, #27-Apr-1982# and so on?

Signature
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)
> Hi all,
> I have a script that assigns a biological season to each record in a
[quoted text clipped - 76 lines]
> Thanks in advance.
> Marco
Marco Brilo - 29 Jan 2007 15:53 GMT
Hi Doug,
I'm not sure I'm following you here. The strDay is a date variable so you
must mean the comparison dates. i.e. 28-Nov-1981 and 27-Apr-1982 in which
case I would need a lot of variables since I have many many date ranges to
compare with (I've only shown a small portion of the code)
Another way I suppose I could write the code is to covert the date into Day
of Year, i.e. Jan 1 of any year is 1, and Dec 31 is 364, except leap years it
would be 365. Do you know of any function in Access that will accomplish
that? Once converted to day of year I could simply compare it as a number.
Thanks
M
> Rather than relying on the date value be formatted in a specific way, why
> not store the value in a Date variable, and then compare it to
[quoted text clipped - 80 lines]
> > Thanks in advance.
> > Marco
Douglas J. Steele - 29 Jan 2007 16:18 GMT
Sorry: I missed the declaration line. (the str prefix for a variable
usually means it's been declared as String: dtm is the normal prefix for
Date variables).
However, you're currently comparing the date variable to strings:
If strDay > "28-Nov-1981" And strDay < "27-Apr-1982" Then
Change that to use Date constants, not String constants:
If strDay > #28-Nov-1981# And strDay < #27-Apr-1982# Then

Signature
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)
> Hi Doug,
> I'm not sure I'm following you here. The strDay is a date variable so you
[quoted text clipped - 103 lines]
>> > Thanks in advance.
>> > Marco