Hide subform based on query results

Crash_Pie

Registered User.
Local time
Tomorrow, 04:08
Joined
Feb 15, 2007
Messages
36
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.
 

Attachments

Hi Spasticus

Thanks for the assistance, you've solved the conundrum for me - I can't believe how simple that was! :o

Keep up the good work.

Crash
 

Users who are viewing this thread

Back
Top Bottom