Cross Tab query not displaying correctly in subform

GBalcom

Much to learn!
Local time
Today, 06:21
Joined
Jun 7, 2012
Messages
460
I have a crosstab query that displays correct results on it's own when opened as it's own tab, in datasheet view. I want to use this in another form. When I place it in subform/subreport control's datasource on that form (inside a tab control if it matters), it doesn't display correctly. The dates are wrong and values are missing. :banghead:

This crosstab is based on another query which uses a VBA public function to find the first day of a week. (In case it matters). I'm attaching pictures of the datasheet view, and the view inside the form.
 

Attachments

  • SubformView.PNG
    SubformView.PNG
    13.9 KB · Views: 196
  • CrossTabDataSheetView.PNG
    CrossTabDataSheetView.PNG
    6.2 KB · Views: 96
You didn't ask any question and I don't know really how to help you other than to play Captain Hindsight and say--this is why you don't build forms and reports on cross-tab queries.

Forms/Reports require field names. Cross-tab queries have dynamic field names. You no longer have a field called [1/29/2017] in your query, therefore your form cannot populate the data for the control that looks there.

My advice is to reconfigure your form to use a more traditional look and data source.
 
Plog,
Thank you for your quick response. I thought the question was obvious....what's wrong & how do I fix it. My apologies, next time I'll be more specific.

Is there a better way to view a cross tab within a form then the subform control?
 

Users who are viewing this thread

Back
Top Bottom