Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Developer Toolkits / March 2006

Tip: Looking for answers? Try searching our database.

Query Error in Access 97

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
MattyM - 30 Mar 2006 23:29 GMT
Error Message: Function isn't available in expressions in query expression.

I have run into this issue in a couple old applications created in Access
97, and each query uses the Date() function. One query is as simple "Select *
From MemberEvents Where [begindate]<(Date()-90)".  Now the queries used to
work before the user's PC's were migrated to Windows XP. Everything I have
found points to a missing library, or link to a library. I attempted a fix in
which the library links were essentially reset, but then ended up with a
different error. If I replace the Date() function with Now() the query will
run without error messages (this is not to say it returns the correct ammount
of records).
It doesn't seem to be a library issue to me, yet I can't seem to find any
other evidence to say otherwise. Is there an issue with using the Date()
function in a query that I have not been able to confirm or am I missing
something else?

 
Douglas J. Steele - 31 Mar 2006 00:35 GMT
I know you said you checked your references, but here's my cookie-cutter
response:

Two common reasons.

The first is that you've used Date somewhere else in your database: a field
in a table, a control on a form, or something like that. Date is a reserved
word, and should never be used in anything you created in the database.

The other possibility is that your references are 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)

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)

> Error Message: Function isn't available in expressions in query
> expression.
[quoted text clipped - 16 lines]
> function in a query that I have not been able to confirm or am I missing
> something else?
MattyM - 31 Mar 2006 15:32 GMT
OK - that did it. I deselected everything I could and readded the references
and it appears to be working now. I did notice that I couldn't readd a
control, but I don't see it being used anywhere in the application. I'll keep
an eye on that and work from there, main thing is for now the query is
working. Thank you for your help!

> I know you said you checked your references, but here's my cookie-cutter
> response:
[quoted text clipped - 50 lines]
> > function in a query that I have not been able to confirm or am I missing
> > something else?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2010 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.