Sudden 'compile error. in query expression' (1 Viewer)

songofsolon

Registered User.
Local time
Yesterday, 22:01
Joined
Jul 25, 2003
Messages
11
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.
 

songofsolon

Registered User.
Local time
Yesterday, 22:01
Joined
Jul 25, 2003
Messages
11
Per the advice of someone with more common sense than me, I tried compiling the db again, and it fixed the problem. FYI.
 

ajester

New member
Local time
Today, 01:01
Joined
Jan 13, 2010
Messages
1
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
 

Users who are viewing this thread

Top Bottom