can't make a button visible value to false

associates

Registered User.
Local time
Today, 07:18
Joined
Jan 5, 2006
Messages
94
Hi again,

looks like it hasn't been my day.

I have another issue again and am confused why it doesn't work. I was trying again to set a button visible to false on another form.

Here is the code.
Private Sub CM_PDFConverterOFF_Click()
Forms!Subject_Summary_Selection!CM_Convert2PDFSelection.Visible = False

Forms!Outline_Selection!CM_Convert2PDFSelection.Visible = False
Forms!Outline_Selection!CM_Convert2PDFALL.Visible = False

Me.CM_PDFConverterON.Visible = True
Me.CM_PDFConverterON.SetFocus
Me.CM_PDFConverterOFF.Visible = False
End Sub

The error message that i got is as follows

Error No. 2450, can't find the form "Subject_Summary_Selection".

I have checked the spelling and it's right but still Access doesn't like it.

Have i done anything wrong here?

Thank you in advance
 
is the form "Subject_Summary_Selection". open?
 
Dennisk,

Yes, it works now. it didn't work because the form was closed. I suppose i have to put the code in the if condition to check whether the form is open or not.

Thank you for your help
 
Search here for the IsLoaded Function. This will do what you want.

Dave
 

Users who are viewing this thread

Back
Top Bottom