Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

=Date() Office 2K Doesn't work!?

Status
Not open for further replies.

MkIIISupra

Programmer
Apr 17, 2002
108
0
0
US
I have an Access 97 Application that I am converting over to Access 2000 and in the Tables I have the Default Value on a couple of Fields set to

=Date()

Which will display the current date. All is good with that right!? Wrong, in Office 2K I get the following error message while trying to save the table:

"Unknown function 'Date' in validation expression or default value on 'tblOrdersBuffer.sDate'.


This is one problem I am having. The other is with the UCase function which worked in Access 97 but now isn't in Access 2K. I will post that error message in another thread.

Thank you! One by one the penguins steal my sanity!
 
Hi there,

Have you checked to see if there are any broken references?

Dan
 
I have been going through the Access Help files and I can't seem to find anything about the =Date() function. I installed the entire Office 2K package. As far as broken references, I am not sure what you mean. It's a simple function that isn't working anymore. I heard that the functions and libraries were changed in O2K but I have not a clue as to what the changes are??? One by one the penguins steal my sanity!
 
The Date() function should work fine in Access 2000...


Go to the immediate window (i.e. press Ctl+G)

Type the following:

? Date()

What happens? Do you get an error? Go to the menu bar, select "Tools", then "References". Do any of the items in the list say have "(MISSING)" in front of them?

Cheers,
Dan
 
I've had no problems using the =Date() function in Access 2000. Maybe you should just recreate the box you are working with.

Or you can try =Now() which does the same thing, but also includes the time.

Spyder757
 
It displays the current date. Thanks for that info though! I didn't know about that capability! So now what do you think it might be? One by one the penguins steal my sanity!
 
hmmm, not sure

Try Spyder757's suggestion: Delete the field (control) and create a new one. See if you get the same problem.

Do you have the problem in any of the other forms?

Dan
 
Hi MkIIISupra

did you check the reference by going to "Tools>References" in the menu bar....and look for "MISSING:"?

The reason i'm on the "Reference" Theme (either broken or corrupt) is because we know the Date() function is supported in MS Access 2000 via the vba library. Also, If ANY reference is broken (missing) then it affects all other references. Since vba functions are used often and at the top of the reference list, they are generally the first to pick up the problem. Furthermore, the error message you are getting is exactly what happens when you have a broken reference.

However, the part that stumps me is when you type "? Date()" in the immediate window, an error message usually displays "Can't find project or library" - which is not happening. I'm not sure if this message occurs if a referenced dll file is corrupt(?).

Have you recently upgraded to MS Office 2000?

Cheers,
Dan


 
I have a laptop that I just recently set-up as a dual boot, SuSE 8.1 Linux and Windows 2000 Pro, I am using my SuSE desktop to post here now. Anyhow in the W2K I installed Office 2K. My shop is still running Win NT 4.0 with Office 97 but they will be upgrading to W2K and O2K in the next 6 months. I have been tasked with converting all the Access 97 apps I have built to Access 2K. Since I own the laptop I have all rights and access so I am not sure what is going on. I am booting back to windows now to check out Tool/References and see what is up with that....

Okay here is what I am seeing: I don't see References in the Tools menu? I am running the Performance Analyzer now, maybe this will help? I dunno. I'll keep looking for the Tool/References menu item. One by one the penguins steal my sanity!
 
You're looking at the wrong menubar .. :)

In Access, press alt+F11, to get into the 'code' IDE part of Access. Then, you will see another menubar which has "tools>references"...


Good luck,
Dan
 
I also had the problem, it DID NOT occur of my development PC, only on installed PC's. I removed the Date() and changed to Now(), that did the trick.
 
Another source of this problem may be in the upgrade level of Office 2K & Win 2K Pro. Both have reference upgrades in the SR-1/SP-2 updates for Office & SP-3 for 2K Pro. FYI: Office 2K Pro is running M$ Jet 3.51

Cj
 
Found it, okay here is what is checked in my available references:

Visual Basic for Applications
Microsoft Access 9.0 Object Library
Microsoft DAO 3.6 Object Library
Microsoft ActiveX Data Objects (Multi-dimensional)2.5 Library
Microsoft ActiveX Data Objects 2.0 Library
Windows Media Player
MISSING: AxCtrl32 OLE Control Module
OLE Automation
Microsoft Visual Basic for Applications Extensibility 5.3
DirectAnimation Library
DBNamespace 1.0 Type Library
DirectX 8 for Visual Basic Type Library
Effect Library
EventsSystem 1.0 Type Library

MISSING: AxCtrl32 OLE Control Module

I suppose this is the problem, so the question is if so then how do I correct it?

And =Now() even though it works is not a viable nor an acceptable solution. It is outside the parameters of the application requirements. The requirements call for only the current date to be displayed, which is accomplished by =Date(). I have to stay with the design requirements or implement a requirements review for modification of the format, which will be shot down before I finished the request. But thank you! One by one the penguins steal my sanity!
 
Okay I am on Microsofts web site and I can't find a reference to AxCtrl32 OLE Control Module in there MSDN library but I am finding a couple references to OLE libs. I know what the error is and I know how to correct it, what I don't know is what I need to use to correct it. Does that make sense? One by one the penguins steal my sanity!
 
Hi MkIIISupra,

I'm not sure what "AxCtrl32 OLE Control Module" is, but at a guess I would say its to do with Palm HandHeld (google search :) ).

I take it your MS Access Application has one or more of forms, reports, or modules - since you have a number of references ticked.

I also assume that your app requires this reference in order to function properly. Furthermore, I'm also curious as to whether your app requires other proprietary software to be present on your machine (e.g. PalmHeld), or does it contain custom ActiveX (ocx) embedded in forms.

If you implicitly reference your objects in code, i.e. &quot;Dim myObject as <reference.object>&quot; (as opposed to Dim myObject as Object.....Set myObject = CreateObject(&quot;...&quot;) ) then you can un-tick this reference and compile your code. If your code compiles ok then simply leave the reference un-ticked.

Now, lets see if the file exists on your computer. Go back to the reference dialog box, menubar 'tools>references', and click on the reference the says &quot;MISSING:&quot;. At the bottom of the form you should see a label that says &quot;Location&quot;. This tells you the path and filename of the missing reference. Go to Windows Explorer and search for the filename shown.

Did you find the file?

If so, was it in the same path as shown in the references dialog box? If not, then goto the reference dialog box again, un-tick the missing reference, then click the browse button and locate the file. This should fix your missing reference problem.

If you find the file, and it is in the SAME location, then you could try to the re-register the file using the Regsvr32.exe utility:

Click on the windows start button, click run:

for dll file, type

Regsvr32.exe <path and filename>

for exe file, type

<path and filename> /regserver

If this doesn't work, you're need to find out where this reference comes from and re-install it (same applies if you can't find the file at all on your computer). My guess, it comes with another software package install.

Does any of this help?

So, in summary, i'm trying to establish if your app communicates with other software, does it contain custom ActiveX controls in forms, is the other required software (if any) installed, could you find the missing file in your computer.

I hope this helps you....

Cheers,
Dan


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top