By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
462,882 Members | 745 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 462,882 IT Pros & Developers. It's quick & easy.

Using a Form to set criteria for a crosstab query

P: 1
I am using Access 2002. I have created a query that has a crosstab query linked to it. The query runs fine initially. but I went back to add criteria to the query that is coming from a form and now I get the following error message as the query is running: "The Microsoft Jet database engine does not recognize [forms]![FormName]![fieldname] as a valid field name or expression.". If I remove the crosstab query link or save the crosstab data to a file and then link to the file the query runs fine using the form criteria. How can I get Jet engine to recognize the form fields? This only happens when using forms associated with crosstab queries.
Jun 8 '10 #1
Share this Question
Share on Google+
1 Reply

P: 55

Expand|Select|Wrap|Line Numbers
  2. Dim stLinkCriteria As String
  3. stLinkCriteria = "[banking] =" & "true"
  5. DoCmd.OpenReport "BankingReport", _
  6.  acViewPreview, "", stLinkCriteria, acNormal

Jun 9 '10 #2

Post your reply

Sign in to post your reply or Sign up for a free account.