S
Steve
Folks, this is driving me crazy!
I have a crosstab query that I want to show in a sub form inside of a master
form as view only. I grafted the code from the Access Developer's handbook
to dynamically rename and re-source text boxes in the form to match the
columns of the crosstab.
I got it working fine, except that it showed more records than I wanted. I
tried using a filter, but that had no effect. I tried specifying a criteria
(which is a text box value in the master form, derived from the current
record in another subform) in the design view of the crosstab query, and
that earned me a message about jet not recognizing the value. So I defined
the criteria as a parameter in the query. Now the query runs fine, and
yields the records I want, as long as the master form is open.
However, when I open the master form, containing the subform based on the
same query, which ran fine without the criteria & parameter, I get a message
about not using a crosstab w/o fixed columns as a pass through, even though
I was previously using a crosstab w/o fixed columns with no message ;-) No
master or child link fields are set for the subform.
So I then decided to make the subform unbound, and put the query into the
on_current event of the form. Then it wouldn't run at all - the subform
comes up empty, the headings are there, but no data. Am I using the wrong
event? I'd like to have the subform update when data in other subforms is
changed.
Is there any way to filter this crosstab? I would have it feed a table and
then use the table, but this is a fairly dynamic application and I'd be
re-writing the table every time data changes in three other subforms -
basically on every change during data entry.
Anyone have any ideas?
Thanks!
I have a crosstab query that I want to show in a sub form inside of a master
form as view only. I grafted the code from the Access Developer's handbook
to dynamically rename and re-source text boxes in the form to match the
columns of the crosstab.
I got it working fine, except that it showed more records than I wanted. I
tried using a filter, but that had no effect. I tried specifying a criteria
(which is a text box value in the master form, derived from the current
record in another subform) in the design view of the crosstab query, and
that earned me a message about jet not recognizing the value. So I defined
the criteria as a parameter in the query. Now the query runs fine, and
yields the records I want, as long as the master form is open.
However, when I open the master form, containing the subform based on the
same query, which ran fine without the criteria & parameter, I get a message
about not using a crosstab w/o fixed columns as a pass through, even though
I was previously using a crosstab w/o fixed columns with no message ;-) No
master or child link fields are set for the subform.
So I then decided to make the subform unbound, and put the query into the
on_current event of the form. Then it wouldn't run at all - the subform
comes up empty, the headings are there, but no data. Am I using the wrong
event? I'd like to have the subform update when data in other subforms is
changed.
Is there any way to filter this crosstab? I would have it feed a table and
then use the table, but this is a fairly dynamic application and I'd be
re-writing the table every time data changes in three other subforms -
basically on every change during data entry.
Anyone have any ideas?
Thanks!