Hi there.
I've been racking my brains the last few days trying to figure out how to hide a subform based on the results of a query. It seems I don't know as much as I thought I did!
Essentially I have a main form with several checkboxes, a single button that runs the query, and the subform to display the query results.
Here is what I've been trying to do:
1. When the mainform (parent?) opens, the subform to be hidden. (I had that working ok but have removed the code while experimenting).
2. If there are no records to be displayed from the query then I want the subform to be hidden.
3. Display the subform if there are records in the query recordset.
Could someone please have a look at the attached "cutdown" portion of my database and tell me where I am going wrong. Thank you.
I've been racking my brains the last few days trying to figure out how to hide a subform based on the results of a query. It seems I don't know as much as I thought I did!
Essentially I have a main form with several checkboxes, a single button that runs the query, and the subform to display the query results.
Here is what I've been trying to do:
1. When the mainform (parent?) opens, the subform to be hidden. (I had that working ok but have removed the code while experimenting).
2. If there are no records to be displayed from the query then I want the subform to be hidden.
3. Display the subform if there are records in the query recordset.
Could someone please have a look at the attached "cutdown" portion of my database and tell me where I am going wrong. Thank you.