Query Error

M

Martyn Griggs

I've converted a database from Access 2000 back to Access
97, all works OK apart from one column which I added to a
query to extract the year from another column in the query
called Profit Period. The expression for the new column
I've entered is: Profit Year: Format$([Profit
Period],"yyyy"). This works fine in 2000, for example for
01-Mar-2003 it returns 2003 into this column, but after
converting to 97, it returns #Error and the query then
prompts for parameter for yyyy, which I don't want it to
do. Anyone have any ideas? Thanks for your help.
 
J

John Vinson

I've converted a database from Access 2000 back to Access
97, all works OK apart from one column which I added to a
query to extract the year from another column in the query
called Profit Period. The expression for the new column
I've entered is: Profit Year: Format$([Profit
Period],"yyyy"). This works fine in 2000, for example for
01-Mar-2003 it returns 2003 into this column, but after
converting to 97, it returns #Error and the query then
prompts for parameter for yyyy, which I don't want it to
do. Anyone have any ideas? Thanks for your help.

Why not simply use Year([Profit period]), if the latter is a Date/Time
field?

This appears to be the very common References bug. Open any
module in design view, or open the VBA editor by typing
Ctrl-G. Select Tools... References from the menu. One of the
..DLL files required by Access will probably be marked
MISSING. Uncheck it, recheck it, close and open Access.

If none are MISSING, check any reference; close and open
Access; then uncheck it again. This will force Access to
relink the libraries.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top