Results 1 to 3 of 3
  1. #1
    WendellS is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Aug 2016
    Posts
    10

    Crosstab table / query


    I have a linked Excel file (I can't change) I have created a crosstab table from that. The Crosstab table works great. And then I have a simple query that reads the fields from the crosstab. Now here is the problem. The data that the crosstab reads changes. (Remember I have no control over that Excel file)

    So one day I have 5 fields in the crosstab and the next I only have 4 fields. But the query won't work because it's set up for 5 fields and gives an error message doesn't recognize field XXXX as a valid field name.

    Anyway to fix this problem ?

  2. #2
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    So one day I have 5 fields in the crosstab and the next I only have 4 fields
    I presume you mean columns rather than fields. If you do, you need to set the column headings (open query properties and add them there separated with commas).

    They will then all appear whether they are populated with data or not

  3. #3
    WendellS is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Aug 2016
    Posts
    10
    Ajax!! That was it! Thanks I appreciate it. I'm glad it was something simple. Thanks again !

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

Similar Threads

  1. Replies: 3
    Last Post: 05-25-2015, 05:23 AM
  2. Table like a crosstab query but not
    By CodLiverOil in forum Reports
    Replies: 5
    Last Post: 05-18-2015, 12:08 PM
  3. Combine Crosstab query with Table to export together to Excel
    By kattatonic1 in forum Database Design
    Replies: 3
    Last Post: 04-04-2014, 10:56 AM
  4. Replies: 1
    Last Post: 07-30-2010, 10:28 AM
  5. make a temp table from crosstab query
    By stigmatized in forum Programming
    Replies: 0
    Last Post: 07-26-2010, 03:01 PM

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