IsVisible method

brighteyes

Registered User.
Local time
Today, 15:35
Joined
Oct 12, 2004
Messages
14
I have a form with an option button called optInTheCabinet and a list box called lstInTheCabinet. When ever optInTheCabinet is clicked, I want lstInTheCabinet visible. The value of optInTheCabinet = 1, and the visible property is set to "No." I am getting the error message "Invalid Use of Property," and the debugger highlights ".IsVisible" What am I doing wrong? Is there a better way to do this?

Private Sub optInTheCabinet_GotFocus()
If Me.optInTheCabinet = 1 Then
Me.lstInTheCabinet.IsVisible
Else
Me.lstNotInTheCabinet.IsVisible
End If
End Sub
 
Last edited:
You may need to place your option button in a frame or use a check box.

???
kh
 
hmm. Thank you for the suggestion. Im not sure what the purpose of frames are, but I will try it out. the code is good though?

KenHigg said:
You may need to place your option button in a frame or use a check box.

???
kh
 
I am still getting the "invalid Property" when using a checkbox. I am beginning to think there may be some configuration problems with access 2003...........
 
Cut and paste your new code for us to look at.

kh
 
the correct syntax (unless it's been changed) is .Visible = True and False resp.
 
Hi!

The IsVisible property of controls, are only available in the on print event of report sections. Use the .Visible property on form controls.
 
Private Sub chkXonACabinet_Click()
If Me.chkXonACabinet = 1 Then
Me.lstXonACabinet.IsVisible
Else
Me.lstCheckedOut.IsVisible
End If
End Sub

This is driving me nutts!! :)
 
Thank you, I think I am getting closer now. Now I am getting the message "Runtime error 2427... You entered an expression that has no value."

???

If Me.optXonACabinet = 1 Then
Me.lstXonACabinet.Visible = True
Else
Me.lstCheckedOut.Visible = True
End If

I know my syntax is probably wrong... im learning though!! ;)

Rich said:
the correct syntax (unless it's been changed) is .Visible = True and False resp.
 
ok ive got to go to a meeting... Ill be back in an hour to try to figure this out again. thanks for your help and suggestions... im getting close, but im still not there.

:)
 

Users who are viewing this thread

Back
Top Bottom