unknown function 'date'

T

triwest

I have an Access97 db that has been running fine for a couple years on Win98
machines. New XP Pro machines have recently been purchased, now the
database is returning 'unknown function "date"' errors on forms and reports
on the XP machines.

For instance, I have a text box on a report with control source '=Date()',
formatted to Medium Date. When the report runs, the text box returns
'Name?'

I've run copies of this same database on other XP machines without any
problem.

Assistance much appreciated!
 
K

Kristyn Wagoner [MSFT]

Sounds like you may have a missing reference on the new machines. Take a
look at this article and see if it addresses the issue you are experiencing.

Q208218 ACC2000: VBA Functions Break in Database with Missing References
http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q208218

--
Kristyn Wagoner
Microsoft PSS

Please do not reply directly to this alias. This alias is for newsgroup
purposes only.

This posting is provided "AS IS" with no warranties, and confers no rights.
 
T

triwest

Kristyn,

I appreciate your response, however, this is not a custom VBA function but
an 'out of the box' simple date/time function native to Access 97. The
article you suggest does not seem to apply.

Thanks, Dean
 
J

John Vinson

I have an Access97 db that has been running fine for a couple years on Win98
machines. New XP Pro machines have recently been purchased, now the
database is returning 'unknown function "date"' errors on forms and reports
on the XP machines.

For instance, I have a text box on a report with control source '=Date()',
formatted to Medium Date. When the report runs, the text box returns
'Name?'

This appears to be the very common References bug. Open any
module in design view, or open the VBA editor by typing
Ctrl-G. Select Tools... References from the menu. One of the
..DLL files required by Access will probably be marked
MISSING. Uncheck it, recheck it, close and open Access.

If none are MISSING, check any reference; close and open
Access; then uncheck it again. This will force Access to
relink the libraries.

The previously posted link to the Knowledge Base was in fact
applicable (though that fact may not have been clear from the
wording!)
 
A

acc2000user

hi,

If you are updating the database to Access 2000 or XP, try
to add reference to microsoft ADO library. To do this:
1. Open VBA code edit window.
2. From menu bar -> Tools -> references
Select Microsoft DAO 3.6 Object library
-> click OK.
3. Run your code again.

good lock
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top