check for an empty subform

R

Ramuk

I have an adp Access2003 form with a List subform. The record source for the
subform is a SQL2K sproc with a parameter. There is a button click event on
the main form that opens another form, when a row on the subform is selected.
I am trying to hide the button if the subform is empty. To do this, I am
trying to get the record count for the subform, assuming it will be zero or
null, if empty.
On mainform a textbox controlsource =
Me![subformname].[Form].[RecordsetClone].[RecordCount]
This syntax does not seem to work, as I get a #Name error. I am sure I used
the correct subform name from the Other tab in the property box for the
subform control. Can someone lead me to a working solution ? I figured, if I
can get a record count in the subform, I could use that to toggle the visible
property on the mainform button
Thanks
 
Top