Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problems with frame

Status
Not open for further replies.

xerife007

Technical User
May 7, 2002
40
PT
Hi, tek-tips forum

I have a problem with one frame. This frame have some textbox's and i have a checkBox who's enable and disable de textbox's.
How can i do this code?
is possible i have in the frame a testbox with the same name of other textboxs in the same form but not in the frame ?
 

To answer your last question yes you can have an array of textboxes contained withing a form and have some of them contained within a frame that is contained within the same form.

[tt]
Option Explicit

Private Sub Form_Load()
Check1.Value = vbChecked
End Sub

Private Sub Check1_Click()

Dim C As Control, Test As Boolean

DoEvents

If Check1.Value = vbChecked Then Test = True

For Each C In Me.Controls

If TypeOf C Is TextBox Then
If C.Name = "Text1" Then
If C.Container.Name = "Frame1" Then C.Enabled = Test
End If
End If

Next

End Sub

[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top