Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cross Tab Queries as Report Source 1

Status
Not open for further replies.

LarryDeLaruelle

Technical User
May 19, 2000
1,055
0
0
US
General question on how to handle changing results when using cross tab queries as the source for reports.

I encountered a problem with one of my reports which tracks residents receiving any of several medications by date prescribed. The queries' column setting is the field that contains the medication name; row is the resident name; the prescription date is returned as a value under the medication column.

When the report was first created at least one resident was receiving at least one of the seven tracked meds and each was included in the detail line.

The problem now is that one of the tracked meds is not being administered to any resident (but may be again at any time in the future) and the cross tab does not contain a column for that med even though the report still has the original seven. As a result I get a message that Access does not recognize the name of the report's control for that med. (Hope that wasn't too confusing.)

Is there a way to trap for this error in the On Open or On Format events? And, if so can anyone help me with the syntax?

Thanks much.

Larry De Laruelle
larry1de@yahoo.com

 
To display all the columns in a crosstab query, even if the columns contains no data: Use the ColumnHeadings property to specify all the columns you want to display, ie: "January", February, etc.
With this way you also specify the order of the columns.

Also, have a look to Access2000 Help "ColumnHeadings Property" for a more detailed description
 
maria28gr:

That is simple and sweet. Works like a dream.

Thank you very much.

Larry De Laruelle
larry1de@yahoo.com

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top