gary.newport
Registered User.
- Local time
- Today, 08:04
- Joined
- Oct 14, 2009
- Messages
- 79
I have a form that is based upon a crosstab query. Due to the fact that the column widths vary I cannot have the form based upon this query if I want to have it as a subform. I need it as a subform since the data being displayed is based upon four dropdowns on the main form (Course, Unit, Class, Student).
When the form loads the fours dropdowns are empty and so the subform loads, reads in the form_load. The form_load executes another subroutine that sets the recordset of the form accordingly and makes controls visible or invisible as required. When everything is null then a single label appears stating that "This unit of work has no data".
All of this is working. If I hardwire a unit, class or student value then everything works fine (the Course value is to be used for something else).
However, if I load the form (everything works as expected0 and then change the Unit dropdown in the main form, how can I get the subform to execute all the code again AND display the data in the subform as expected?
When the form loads the fours dropdowns are empty and so the subform loads, reads in the form_load. The form_load executes another subroutine that sets the recordset of the form accordingly and makes controls visible or invisible as required. When everything is null then a single label appears stating that "This unit of work has no data".
All of this is working. If I hardwire a unit, class or student value then everything works fine (the Course value is to be used for something else).
However, if I load the form (everything works as expected0 and then change the Unit dropdown in the main form, how can I get the subform to execute all the code again AND display the data in the subform as expected?