Access 2003, Why do I get an error on the FileDate Time func.?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

is I used the FileDateTime function in Access 97. I have now upgraded to
Access 2003 and I cannot seem to get the same FileDateTime function to work
on my same report.

The Microsoft Support website says that FileDateTime is available in Access
2003.

One thing I do not know how to check if my IT guy loaded all the "bells and
whistles" to make the FileDateTime function work. If that is not a reason
why it the function is not working, then why do I get the "Error#" on my
report.
 
Check your References collection. Go into the VB Editor and select Tools |
References from the menu bar.

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)
 
Thaks for your reply Doug. I tried all your suggestions and still could not
get it to work.

When I looked in "References", I saw a number of modules not checked.
Therefore, is it possible that the function "FileDateTime" is in one of the
modules that is not checked. If so, do you know in which "Reference" would
the "FileDateTime" function exist in ?

The references I have checked (selected) are:
Visual Basic for Applications (cannot be removed)
Microsoft Access 11.0 Object Library (cannot be removed)
Microsoft DAO 3.6 Object Library
OLE Automation
Microsoft Visual Basic for Apoplications Extensibility 5.3
Windows Media Player

Let me know. Thanks. Alex.
 
The FileDateTime function is the VBA library, which you're indicating is
there. The problem is that if any of the references are broken, Access can
have problems finding VBA functions.

I question having both Visual Basic for Applications and Microsoft Visual
Basic for Applications Extensibility 5.3.

Try removing the VBA Extensibility reference.

Also, do you need the Windows Media Player reference? (i.e.: have you added
it as a control on any of your forms?) If not, remove it as well.
 
Thanks for the reply Doug.

I tried what you recommended and it did not work. Let me be more specific
on one thing. I am not using the "FileDateTime" function in the MS VB Editor
itself. The ""FileDateTime" function is in the reports and macros of Access.
These reports and macros are used when a user clicks on buttons or drop down
boxes in the "Forms" of Access.

So is there a way to ensure a similar thing like "References" is being used
in Access 2003 and not necessarily only in the Visual Basic editor ? I hope
I made sense.

Maybe there is no difference between the two - using the function in Macros
in Access versus using the function in the VB Editor. But I wanted to be
clear that I am not using the "FileDateTime" function in scripts in the VB
editor - just on reports and macros in Access itself.
 
Thanks for replying Doug.

Thanks for the Sandbox tip. It worked.

In case you are interested......My Sandbox value was at 2. I set it at 1
and it still did not work. I now have it at zero (and I read and understand
the security outcome) and it works fine. Just wanted to share that in case
someone else asked the same thing.

Thanks again and thanks for sticking with me on this one. Great Job!!
 
Back
Top