Link to home
Start Free TrialLog in
Avatar of Hidihi
Hidihi

asked on

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?
Avatar of fedsuns
fedsuns
Flag of United States of America image

Hidihi,
     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
Avatar of bcbell
bcbell

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.
Avatar of Hidihi

ASKER

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.
ASKER CERTIFIED SOLUTION
Avatar of Trygve
Trygve

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Hidihi

ASKER

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.