C
Can Of Worms
I have been beating my had against a wall for a few hours now. I am 1 step
away from finishing this module within an interface I maintain, and all of
the sudden one of my subforms starts acting up on me.
The subform (actually a subform of a subform) displays payment history of
the customer selected in the parent form (which is a subform itself). The
payment information displayed depends on which payment history source the
user selects in a drop-down on the parent form, since I have 4 different
tables scattered around the network that are potential locations for payment
information to show up. (4 is the fewest i have been able to reduce to, was
15). The subform was initially based on a query that returns records combined
from all 4 sources, with a source ID tag for filtering, then the form was set
to filter based on the drop-down selected.
All yesterday, it was functioning correctly, requerying and repainting as
tested in run-time by changing the payment history source and the customer.
A few hours ago, the payment history subform began returning all of the
records of a couple of customers, regardless of source selected, and not
returning any records of other customers, and not updating anything and still
showing old information when a new customer is selected. All without any
changes in the code that handles the subform. Attempting to straighten that
out, found that the subform did not have any filter criteria set any more. I
added the criteria back in, saved the form, and re-started run-time to test
it, with the same results. I went have to the design view of the subform, and
the filter criteria was missing again. I repeated this a few times, including
completely exiting the database and re-opening it, and it cleared the filter
criteria each time.
I then attempted to set the criteria through VBA, but it attempts to set the
criteria before it has completely loaded the parent form it is on, and gives
an Object Required error.
I then added a new query which has criteria based on the source selected,
and just set that query as the record source for the subform. When I did that
however, for some reason the subform set a new filter line and sort order.
The sort order was based on a completely unrelated table, and the filter
criteria line was on the correct query, but was restricting information to 1
specific customer, which it populated ID and name correctly as strings within
the filter.
I cleared the filter and the sort order, saved the subform, and went to
run-time to test. Now it was correctly returning information for 2 customers,
nothing at all for 3 others, and everything available for 2 more. I closed
everything, re-opened the database, went into run-time and as I selected each
customer/source, I checked the underlying queries, and found that the
recordsource queries are returning the correct information I am trying to
display, it just isn't showing up on the subform.
I have multiple .requery and .repaint lines within code to cover when the
user does anything, to make it update the display automatically, but this
isn't making a difference.
Any help would be greatly appreciated.
away from finishing this module within an interface I maintain, and all of
the sudden one of my subforms starts acting up on me.
The subform (actually a subform of a subform) displays payment history of
the customer selected in the parent form (which is a subform itself). The
payment information displayed depends on which payment history source the
user selects in a drop-down on the parent form, since I have 4 different
tables scattered around the network that are potential locations for payment
information to show up. (4 is the fewest i have been able to reduce to, was
15). The subform was initially based on a query that returns records combined
from all 4 sources, with a source ID tag for filtering, then the form was set
to filter based on the drop-down selected.
All yesterday, it was functioning correctly, requerying and repainting as
tested in run-time by changing the payment history source and the customer.
A few hours ago, the payment history subform began returning all of the
records of a couple of customers, regardless of source selected, and not
returning any records of other customers, and not updating anything and still
showing old information when a new customer is selected. All without any
changes in the code that handles the subform. Attempting to straighten that
out, found that the subform did not have any filter criteria set any more. I
added the criteria back in, saved the form, and re-started run-time to test
it, with the same results. I went have to the design view of the subform, and
the filter criteria was missing again. I repeated this a few times, including
completely exiting the database and re-opening it, and it cleared the filter
criteria each time.
I then attempted to set the criteria through VBA, but it attempts to set the
criteria before it has completely loaded the parent form it is on, and gives
an Object Required error.
I then added a new query which has criteria based on the source selected,
and just set that query as the record source for the subform. When I did that
however, for some reason the subform set a new filter line and sort order.
The sort order was based on a completely unrelated table, and the filter
criteria line was on the correct query, but was restricting information to 1
specific customer, which it populated ID and name correctly as strings within
the filter.
I cleared the filter and the sort order, saved the subform, and went to
run-time to test. Now it was correctly returning information for 2 customers,
nothing at all for 3 others, and everything available for 2 more. I closed
everything, re-opened the database, went into run-time and as I selected each
customer/source, I checked the underlying queries, and found that the
recordsource queries are returning the correct information I am trying to
display, it just isn't showing up on the subform.
I have multiple .requery and .repaint lines within code to cover when the
user does anything, to make it update the display automatically, but this
isn't making a difference.
Any help would be greatly appreciated.