Results 1 to 5 of 5
  1. #1
    jj1 is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2014
    Posts
    128

    Query giving error "Microsoft access doesn't recognize as valid field or expression"

    I have a cross tab query with parameters defined. Query runs fine. However when I run report it give me error "Microsoft access doesn't recognize as valid field or expression". So what's happening is I have 3 fields say A, B, C on the report . A is text fields others 2 are counts. If backend doesn't have data for say either field B or C then it gives me this error. Query is of full page I can post if somebody wants to see.

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,524
    You need to provide no data in case ther isn't any data.
    i make sure to provide 0 to my fields so all fields exist.

  3. #3
    CJ_London is offline VIP
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,418
    could be null values in your data or perhaps you have a typo in one of your expressions - posting the code is unlikely to help. I would check your data first for nulls and protect against them (per ranmans suggestion, or use the nz function or filter them out) If you still get the error start to remove columns from your query until the error goes away and then rebuild from there

  4. #4
    jj1 is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2014
    Posts
    128
    How do I make default value as 0 if no count exists in the report. I tried NZ and it didn't worked. In the back end there is only one field which as 2 values B and C. so for a particular date range there could be 10 A's and 0 B's. And if B has no values then report gives error.
    Quote Originally Posted by Ajax View Post
    could be null values in your data or perhaps you have a typo in one of your expressions - posting the code is unlikely to help. I would check your data first for nulls and protect against them (per ranmans suggestion, or use the nz function or filter them out) If you still get the error start to remove columns from your query until the error goes away and then rebuild from there

  5. #5
    CJ_London is offline VIP
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,418
    are you dividing by B values? if so, are you protecting from divide by zero errors?

    from what you say, it sounds like it is a data/null issue so on reflection, if it is not the above, post your full sql with the exact error message

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 05-06-2015, 03:33 PM
  2. Replies: 2
    Last Post: 03-08-2013, 12:59 PM
  3. Replies: 1
    Last Post: 04-30-2012, 10:09 AM
  4. Replies: 2
    Last Post: 05-17-2011, 02:40 PM
  5. Replies: 8
    Last Post: 11-12-2010, 10:55 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums