[AccessD] date function

Dan Waters dwaters at usinternet.com
Thu Mar 11 20:35:17 CST 2004


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




More information about the AccessD mailing list