Answered by:
REPORT - The Microsoft Access database engine does not recognize XXX as a valid field name or expression.

Question
-
I have a report in which I'm getting this error. However, I've looked everywhere and can't find the object to which it refers. Is there some magic to debugging this type of thing?
Thank you!
Thanks for your help!!
Tuesday, June 12, 2018 2:18 PM
Answers
-
Check that you spelled all the field names used on the report correctly and that they all exist. It is not uncommon to remove a field or rename a field in the report's query and then forget to update the design of the report.
Another source for this error could be in your grouping and sorting where you might have a field name that doesn't exist.
Check your query for field names that don't exist. One good way to debug this is to run the query outside of the report to see if it errors out.
Check for wrongly named parameters in the query. To do this, open the query in SQL view. If there are parameters they will be listed at the top like this:
PARAMETERS: OrderDate datetime
SELECT CustID, OrderID, OrderDate
FROM tblOrders
WHERE OrderDate = Forms!myForm!OrderDateBill Mosca
www.thatlldoit.com
http://tech.groups.yahoo.com/group/MS_Access_Professionals- Marked as answer by plynton Tuesday, June 12, 2018 10:20 PM
Tuesday, June 12, 2018 2:38 PM
All replies
-
Hi,
Some places to look include the Filter and Order By properties. Also, take a look in the Grouping and Sorting section. Other than that, you may have to examine every unbound textbox using an expression as a Control Source to make sure it's not in there.
Hope it helps...
Tuesday, June 12, 2018 2:36 PM -
Check that you spelled all the field names used on the report correctly and that they all exist. It is not uncommon to remove a field or rename a field in the report's query and then forget to update the design of the report.
Another source for this error could be in your grouping and sorting where you might have a field name that doesn't exist.
Check your query for field names that don't exist. One good way to debug this is to run the query outside of the report to see if it errors out.
Check for wrongly named parameters in the query. To do this, open the query in SQL view. If there are parameters they will be listed at the top like this:
PARAMETERS: OrderDate datetime
SELECT CustID, OrderID, OrderDate
FROM tblOrders
WHERE OrderDate = Forms!myForm!OrderDateBill Mosca
www.thatlldoit.com
http://tech.groups.yahoo.com/group/MS_Access_Professionals- Marked as answer by plynton Tuesday, June 12, 2018 10:20 PM
Tuesday, June 12, 2018 2:38 PM -
Do you have more than one SQL query? Usually it's just a misspelled field name or an issue with parameters being specified, which you can troubleshoot in the query designer.
Paul ~~~~ Microsoft MVP (Visual Basic)
Tuesday, June 12, 2018 2:48 PM