Go Back   Access World Forums > Microsoft Access Discussion > Queries

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 06-04-2004, 10:31 AM   #1
songofsolon
Registered User
 
songofsolon's Avatar
 
Join Date: Jul 2003
Location: High Desert
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
songofsolon
Sudden 'compile error. in query expression'

Please forgive me if this has been answered elsewhere, but I can't seem to find the thread that covers it:

I have a fairly simple db that has been working perfectly for the last 7-8 months, but now I'm getting variations of the following error messages for all but one of my queries:

Compile error. in query expression '(Format([VisitorInfo.Interview], "dddd"))+" at "+(Format([VisitorInfo.Interview], "h:nn am/pm"))+" - "+([VisitorInfo.Interviewer])'.

And:

Compile error. in query expression '(DatePart("ww", [VisitorInfo].[TutorInt]))=(DatePart("ww", Now())+1)'.


There were no changes made to any of the queries, or any code. The only change was the installation of new db software, which I have heard it suggested can sometimes cause reference problems. There are no missing references listed, however, and simply unchecking and rechecking available references did not seem to help, so my minimal knowledge of how to deal with possible reference problems is exhausted.

Any thoughts on this would be greatly appreciated. Thanks.

__________________
Specialization is for insects. -Robert Heinlein
songofsolon is offline   Reply With Quote
Old 07-16-2004, 02:50 PM   #2
songofsolon
Registered User
 
songofsolon's Avatar
 
Join Date: Jul 2003
Location: High Desert
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
songofsolon
Per the advice of someone with more common sense than me, I tried compiling the db again, and it fixed the problem. FYI.
__________________
Specialization is for insects. -Robert Heinlein
songofsolon is offline   Reply With Quote
Old 01-13-2010, 10:16 AM   #3
ajester
Registered User
 
Join Date: Jan 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
ajester is on a distinguished road
Thumbs up Re: Sudden 'compile error. in query expression'

This was great. Had the problem in Access 2007. Had a working Access query that I used in Excel 2007 to create a pivot table and chart, Excel seemed a little nicer with charts Wanted to simulate the NetworkDay function so there would be less to do in Excel, so found some VBA. I don't know how to write VBA. Inserted the VBA from http://www.mvps.org/access/datetime/date0012.htm in a standard Module not a Class Module and my query wouldn't work with the datepart function. They were working earlier!! Found this thread. In VBA under Debug clicked Compile Access9db and the functions worked.

Thanks for the reply to your own post.
Jr., AJ3JR

ajester is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump




All times are GMT -8. The time now is 08:01 PM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Sponsored Links

How to advertise

Media Kit


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World