Changing forms properties

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

Guest

I have a subform called [Short Service Contract Details] whose "Visible"
property is set to "No". I want to change the visible property to "True"
based on the After Update of a combo control. I've used the following code:
Forms![Short Service Contract Details].Visible=True.
The following error message is received:
"... can't find the form 'Short Service Contract Details' referred to in a
macro expression or Visual Basic code". What am I doing wrong?
 
I assume you are calling this from a main form. In that case try

Forms!frmMain![Short Service Contract Details].Visible=True

and if possible try to rename the subform to a form without spaces... for
future use

hth
 
The subform has a name just like any other control on your form. Highlight
the subform on your main form and get its Name property. Then you can use
it's visible property. When you use Forms![Short Service Contract Details]
you're trying to call the actual Form's propert, rather than the Subform
control.
 
Back
Top