Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / August 2005

Tip: Looking for answers? Try searching our database.

DATE() Prompts ME for date!

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
MsHlyl - 31 Aug 2005 01:56 GMT
Hello All,

I am trying to calculate the age of an item by doing the following (where
OPEN_DATE is a field in a table and DATE() is the current date):

DateDiff("d",[OPEN_DATE],[ DATE() ])

It is actually giving me the number of days difference, HOWEVER, it is
prompting me for the current date rather than taking the system date.  Can
someone explain to me what I am doing wrong?  Why isn't it using the system
date?  Why is it prompting me for the value?

Thanks!

MsHlyl
Gina Whipp - 31 Aug 2005 02:08 GMT
Try removing the brackets from around Date(), it thinks [ DATE() ] is a
field in your table/query and since it isn't it's prompting you to enter it.

DateDiff("d",[OPEN_DATE], Date())

> Hello All,
>
[quoted text clipped - 12 lines]
>
> MsHlyl
MsHlyl - 31 Aug 2005 02:54 GMT
Gina, Thanks for the suggestion.  I removed the brackets but it gave me the
following error:

"Undefined function Date in expression."

Would you happen to have any further suggestions?  I would appreciate any.

Thanks!

> Try removing the brackets from around Date(), it thinks [ DATE() ] is a
> field in your table/query and since it isn't it's prompting you to enter it.
[quoted text clipped - 17 lines]
> >
> > MsHlyl
Duane Hookom - 31 Aug 2005 06:04 GMT
Have you tried to compile your code?
Do you have your own function named Date()?
Do you have a module named Date?

Signature

Duane Hookom
MS Access MVP

> Gina, Thanks for the suggestion.  I removed the brackets but it gave me
> the
[quoted text clipped - 30 lines]
>> >
>> > MsHlyl
Ken Snell [MVP] - 31 Aug 2005 14:02 GMT
In addition to Duane's troubleshooting tips, another possible source for
this error is if the refrences are messed up.

Signature

       Ken Snell
<MS ACCESS MVP>

> Have you tried to compile your code?
> Do you have your own function named Date()?
[quoted text clipped - 35 lines]
>>> >
>>> > MsHlyl
MsHlyl - 31 Aug 2005 19:16 GMT
Ken, it was indeed the references; there was one missing.  

Thanks!

> In addition to Duane's troubleshooting tips, another possible source for
> this error is if the refrences are messed up.
[quoted text clipped - 38 lines]
> >>> >
> >>> > MsHlyl
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.