Function univaible in expression?

This is very confusing, I have developed an access database, the tables are linked to a text file which is updated each day. In a query I have entered: Week: Val(Format([Date],"ww")-1). The program works on 4 pc's in the department, but on other pc's with the same version of access and spec I am recieving an error.  Function is not availible in expression in query expression Val(Format([Date],"ww")-1).

I created a new database on the pc that showed the error, entered the same expression into a query and it works.

Is there something in access(permissions etc.) that need to be changed? How do I solve this problem?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

     I am confused also. Problems where things work on one machine but not another are really tough. Anyway please excuse my slowness and confusion but let me ask you this question. On the machines that you get this error can you log into the database as the user that logs into that machine and then open the table with date in it? I have seen that sometimres problems like this are caused by lack of underlying permissions to the table, eitheir by through the network (attached table no permissions to the mdb that the table is from) or from access itself.
Also can you tell me how the tables are linked to the text file? Thanks
John Smith
Check your versions of the files comctrl.ocx and comdlg.ocx..  I had this problem and the older version produced the results you described.  Copy the newer files to c:\winnt\system32 on the problematic machine.
HidihiAuthor Commented:
I have logged onto the machine myself but still get the error. The program run a macro which deletes a table, then runs a make table query. I am unable to open the query through design or open, as it shows the error.

The tables are linked by the Link Table in New.

The database is stored on the server and the user goes in through a shortcut which runs a batch file mapping to the driver. This is fine as access opens and the macro starts but fails at the query.
Open a module in design. Run a compile on all modules and then select Tools, References (on the machine that has the problem) Now if any of the lines checked says missing, then you have something to work on. You can also try reinstalling Access.

Also have a look at the files bcbell mentioned. These have come in a lot of different version, none of the compatible so you need to have the exact same set on all machines. That is if you have referenced them and/or used them in your application.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
HidihiAuthor Commented:
bcbell:  I was unable to find the files you mentioned, so instead of using comctrl.ocx and comdlg.ocx we used comctl32.ocx, comdlg32.ocx. unfortunatley this did not work.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.