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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Expression Function Error when Applying =Date() to field on report

Status
Not open for further replies.

melost

Technical User
May 5, 2005
18
US
On some workstations when running this particular report the date displays as #NAME? and when I attempted to edit the field on the report by just re-entering =Date() in ControlSource I received the following error:

"The function you entered can't be used in this expression.
*You may have used a DoEvents, LBount, UBound, Spc, or Tab function in this expression.
*You may have used an SQL aggregate function, such as Count, in a design grid or in a calculated control or field."

I don't get this error on my workstation and neither do a couple of other folks. Are these workstations missing some VB plug-in of some sort. It's nuts. We installed VisualStudio 6 as a test on a workstationn displaying this behavior and it corrected it. However, that's not really an option to install on all of these workstations. I'm hoping its just a plug-in or other Office app. Any ideas?

melost
 
if you go into the code window on a work station where this is happening, and then go into the tools ->references, is here are there line which say MISSING at the front which are selected.

If there are this is your issues, if you unable these then run it should work.

Let me know what happens...
 
Hello M8KWR,

If it is missing, what should I do? Also, if all else fails, is there perhaps another date format I could use than =Date()

Thanks,
melost
 
I checked a workstation with this issue, and found under references a long list. The ones THAT ARE selected are:

- Visual Basic for Applications
- Microsoft Access 9.0 Object Library
- Microsoft ActiveX Data Objects 2.1 Library
- Microsoft DAO 3.51 Object Library

These are the same on my machie (which displays the date fine).

melost
 
I use to find this when using different versions of access.

Program Error
Programmers do it one finger at a time!
 
Well wouldn't you know it, I added Common Language Runtime Execution Enging 1.0 Library and it worked. Go figure.

melost
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top