Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 4th, 2003, 01:26 PM
Registered User
 
Join Date: Dec 2003
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to umagrama
Default =Date() Problem - I am desperate

Hi everyone... this is my first message here.

I have been working in this project of mine using Access 2000. My problem is that I cannot get the function Date() working. I have looked every where for an answer but I never got it to work. I tried in 4 diferent machines running the funcion Date() and on run time I get something like #None? as the returning value.

Could someone give me a hand on this?

If I run the funcion =Now(), it does work though I do not need the time, only the date. I could change the format of the returning value of Now() though it would become a string. If I can get it to work, my program would become so much more practical, you know. More calculations could be done, less user interaction and so on...

I tried getting help on tek-tips.com but no one got it to work.

Thanks guys...

C.

 
Old December 4th, 2003, 02:05 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,151
Thanks: 2
Thanked 14 Times in 14 Posts
Send a message via ICQ to SerranoG Send a message via AIM to SerranoG
Default

Without seeing your database it's hard to answer this, but I can take a stab at it. Open any VBA code for any procedure and click on TOOLS > REFERENCES. In the references dialog box that opens, look at what you have checked. Here is what I have checked; and my DATE() function works fine.
  • Visual Basic for Applications
  • Microsoft Access 10.0 Object Library
  • Microsoft DAO 3.6 Object Library
  • OLE Automation
  • Microsoft ActiveX Data Objects 2.5 Library
  • Microsoft Office XP Web Components
Note that the list order is also important.


Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division
 
Old December 4th, 2003, 02:40 PM
Registered User
 
Join Date: Dec 2003
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to umagrama
Default

WOWWWWWWWWWWWWWWW!!!!!!!

Apparently it works fine now!!!!!!!!!! I am amazed by it!!! It works like a charm!

Thanks a lot man!!! Thank you!!!

One more thing, would I have to set those references in every computer I put my DB on or it becomes standard for my program?

Thanks again! :D

"When a boy sits next to a girl for a hour, it feels like a minute. Though, when he sits on a hot stove for a minute, it feels like an hour. That's relativity!"
~ A. Einstein
 
Old December 4th, 2003, 02:45 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,151
Thanks: 2
Thanked 14 Times in 14 Posts
Send a message via ICQ to SerranoG Send a message via AIM to SerranoG
Default

You're welcome. :)

That should now translate to all computers, but in case it doesn't, be aware of how to fix it in case it comes up again. I'm curious... which library was it you didn't have checked before that you have checked now?

Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division
 
Old December 5th, 2003, 09:31 AM
Registered User
 
Join Date: Dec 2003
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to umagrama
Default

As matter of fact, I had many references set. I unchecked the ones I knew were not necessary. The following references were not checked:

OLE Automation
Microsoft ActiveX Data Objects 2.5 Library

I belive OLE Automation is the one that was giving my trouble with Date() function. I might be wrong.

I could not find the referance Microsoft Office XP Web Components in my list. I am still on Win98 ;).

Thanks again!

"When a boy sits next to a girl for a hour, it feels like a minute. Though, when he sits on a hot stove for a minute, it feels like an hour. That's relativity!"
~ A. Einstein





Similar Threads
Thread Thread Starter Forum Replies Last Post
Desperate for an answer kase_just .NET Framework 2.0 0 October 5th, 2007 06:54 PM
PLease help me i am desperate harshasks XSLT 1 July 12th, 2007 04:11 AM
desperate newbie lookig for help .... usmanlakhani Classic ASP Components 1 May 1st, 2005 05:10 AM
Desperate need of help... Mrarmbars BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 1 November 18th, 2004 06:24 PM
Simple question Desperate for help!! Raif ASP.NET 1.0 and 1.1 Basics 4 August 7th, 2004 11:55 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.