Microsoft Jet Engine Does Not Recognise......

G

Guest

I have a crosstab query that is based on a select query. The select query
includes criteria that looks for a particular field on a form
('Forms!ViewActivityResourceProfile!ActivityID'). When I run the select query
on its own, it works fine.

However, when I run the crosstab query, I get the following error message:

"The Microsoft Jet Database engine does not recognise
'Forms!ViewActivityResourceProfile!ActivityID' as a valid field name or
expression"

The form "ViewActivityResourceProfile" is open when the query is run.

Any help to resolve this would be greatly appreciated.
 
J

John Spencer

First thing, with a crosstab query you MUST declare your parameters and if
any
other queries are used in the crosstab their parameters must also be
declared.

Open the query in design mode
Select Query: Parameters from the Menu
Fill in the EXACT name of the parameter in column 1
Select the data type of the parameter in column 2

Watch out Access sometimes has a nasty habit of adding extra [] for you.
You want
[Forms]![ViewActivityResourceProfile]![ActivityID]
and Not
[[Forms]![ViewActivityResourceProfile]![ActivityID]]
 

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