Hide subform based on query results (1 Viewer)

Crash_Pie

Registered User.
Local time
Today, 15:45
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

  • CutDownDB.zip
    30.4 KB · Views: 150

spasticus

Registered User.
Local time
Today, 04:45
Joined
Apr 17, 2007
Messages
61
hey crash pie,

i made a couple changes to your db.
 

Attachments

  • CutDownDB.zip
    29.5 KB · Views: 286

Crash_Pie

Registered User.
Local time
Today, 15:45
Joined
Feb 15, 2007
Messages
36
Hi Spasticus

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

Keep up the good work.

Crash
 

Users who are viewing this thread

Top Bottom