Formatted Date() displays #Name?

G

Guest

I have several reports that display a date using the Date() function
formatted. When I view the reports in the .adp, I see the date formatted
properly. But when I compile it into an .ade and run the reports, the field
displays as #Name?. I know that this is often associated with an incorrect
reference, but I am viewing the .ade on the same machine that I used to
compile the .adp. Is there another cause for this error?

As a side note, I did try to use the Now() function formatted instead of
Date() and that actually appears to display properly. I would prefer to be
able to resolve the error though than change the reports because I use this
functionality in numerous places.
 
G

Guest

Thanks for the response! I do not have any other controls named Date. Is
there another reason that you can think of?
 
D

Douglas J. Steele

Your References collection is probably messed up.

References problems can be caused by differences in either the location or
file version of certain files between the machine where the application was
developed, and where it's being run (or the file missing completely from the
target machine). Such differences are common when new software is installed.

On the machine(s) where it's not working, open any code module (or open the
Debug Window, using Ctrl-G, provided you haven't selected the "keep debug
window on top" option). Select Tools | References from the menu bar. Examine
all of the selected references.

If any of the selected references have "MISSING:" in front of them, unselect
them, and back out of the dialog. If you really need the reference(s) you
just unselected (you can tell by doing a Compile All Modules), go back in
and reselect them.

If none have "MISSING:", select an additional reference at random, back out
of the dialog, then go back in and unselect the reference you just added. If
that doesn't solve the problem, try to unselect as many of the selected
references as you can (Access may not let you unselect them all), back out
of the dialog, then go back in and reselect the references you just
unselected. (NOTE: write down what the references are before you delete
them, because they'll be in a different order when you go back in)
 
G

Guest

Thank you for your response as well!

The last option actually did do the trick! I'm still not sure why there was
no missing reference flag though. Also, it let me compile on a machine that
doesn't seem to have ActiveX Data Objects 2.8 (it had 2.5), when that was the
reference that was set.

Thanks for your help!
 

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