Disable subform

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a form and subform. When there isn't a Child record I would like the
subform to be disabled.

After searching this forum I was sure that
Me.sfEnrolments4.Form.Enabled = False
was the solution.

The initial test for existence of a Child record is in Form_Current of the
main form, followed by the attemt to disable (when appropriate) the subform
and the error displayed is
Run-time error'2465': Application-defined or object-defined error

Any help, please.
 
you can't disable a form object, AFAIK. but you *can* disable the subform
"container" control within the main form, as

Me!SubformControlName.Enabled = False

hth
 
Back
Top