DWUTKA at marlow.com
DWUTKA at marlow.com
Mon Mar 15 15:22:52 CST 2004
Just a thought, this may be due to the fact that Date() is a special
function.
For example,
If you say:
i=Val(SomeVariable)
i is now the numeric value of 'SomeVariable'.
However, you can't say:
Val(SomeVariable)=i
Just doesn't work.
However, you CAN say:
Date=SomeDateVariable
Which goes and sets the date on your machine.
The odd behavior you have seen may be related to Time(), Date(), and Now()'s
capability to do that.
Drew
-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Dan Waters
Sent: Thursday, March 11, 2004 8:35 PM
To: 'Access Developers discussion and problem solving'
Subject: RE: [AccessD] date function
John,
In every database I've made on every PC, if I type in Date(), the two
parentheses disappear and the word Date is left (in VBA code).
In the source property for a control, if I typed in =Date(), what I typed in
always stayed, but occasionally (and unrepeatedly), the function didn't
work. I found out that that the =Now() function always worked if typed into
a control's source property. So I quite typing =Date() into the source
property of a control and instead call the following function which is
stored in a standard module:
Public Function CurrentDate() As Date
CurrentDate = CDate(DatePart("m", Now()) & "/" & DatePart("d", Now()) _
& "/" & DatePart("yyyy", Now()))
End Function
HTH,
Dan Waters
-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of John Eget
Sent: Thursday, March 11, 2004 6:39 PM
To: AccessD at databaseadvisors.com
Subject: [AccessD] date function
I had the oddest thing happen today, My databases do not show =Date(), but
only on the new HPs in work.
Has anyone come across this before?
John
--
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com
--
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com