Issue with Cross Tab Query (1 Viewer)

Anticephalous

Registered User.
Local time
Today, 04:29
Joined
Jun 3, 2015
Messages
35
Dear Sirs,

I need your help please! I have an issue with report. Whenever the the field is empty the report won't open and will give me a message "The Microsoft office access database engine does not recognize 'fieldname' as a valid field name or expression"
Please refer to the attached screenshot of the report.
 

Attachments

  • Crosstab Report.jpg
    Crosstab Report.jpg
    100 KB · Views: 95

isladogs

MVP / VIP
Local time
Today, 01:29
Joined
Jan 14, 2017
Messages
18,209
Dear Sirs,

I need your help please! I have an issue with report. Whenever the the field is empty the report won't open and will give me a message "The Microsoft office access database engine does not recognize 'fieldname' as a valid field name or expression"
Please refer to the attached screenshot of the report.

There are lots of fields in your report & subreports.

You haven't said what you want to happen if 'the field' is empty e.g.
Open the report with that field blank?
Use a no data response?

The solution will depend on your requirements
 

Anticephalous

Registered User.
Local time
Today, 04:29
Joined
Jun 3, 2015
Messages
35
sorry.. do you have any idea why this is happening? If all the fields has data, the report opens up perfectly.
 

isladogs

MVP / VIP
Local time
Today, 01:29
Joined
Jan 14, 2017
Messages
18,209
You didn't answer the questions in my last post...

You're probably getting the error as there is no record in one or more of the record sources but without seeing the data all I can do is make an educated guess
 

isladogs

MVP / VIP
Local time
Today, 01:29
Joined
Jan 14, 2017
Messages
18,209
You still haven't answered my questions....

But to answer yours, yes you can do that in one of two ways
1. Specify column headers in the report property sheet.
This works perfectly if the column headers are fixed e.g. Jan, Feb, Mar etc
2. Create a dynamic crosstab query where the column headers are assigned when the report is loaded

You will find info on both of these online or elsewhere in this forum.
I have posted more than one dynamic crosstabs report here including one in sample databases. Title is something like 'extended file properties using VBA'

Please note I am answering this on my phone and won't return to my computer for several hours.

If you need more assistance, you will need to supply more info.i
 
Last edited:

Users who are viewing this thread

Top Bottom