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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cmd button to show 2 text boxes, combo box and check box 3

Status
Not open for further replies.

ixian

Programmer
Jul 13, 2001
128
US
Hey all,

I have a list of 15 text boxes(twice), combo box and check box. Have them all indexed 0 thru 14. Have the 0 visible true while the rest of them false. On click of command button, I wish for the next indexed row of text boxes, combo box and check box to show.

Aaron
 
If you want to always keep a row visible then do

While Index < 14

else

If you want after visible=false to set the first one visible at your clic then:

Private Sub cmdCNF_Click()

txtDFN(icX).Visible = True
txtNS(icX).Visible = True
cboDT(icX).Visible = True
chkNull(icX).Visible = True
icX = icX + 1

End Sub

Private Sub cmdCNT_Click()

Index = 0

While Index < 15

txtTN.Text = &quot;&quot;
txtDFN(Index).Text = &quot;&quot;
txtDFN(Index).Visible = False
txtNS(Index).Text = &quot;&quot;
txtNS(Index).Visible = False
cboDT(Index).Text = &quot;Text&quot;
cboDT(Index).Visible = False
chkNull(Index).Value = 0
chkNull(Index).Visible = False
Index = Index + 1

Wend

icX=0
End Sub



(BTW where do you set icX (the one bold in cmdCNF_Click) the first time you clic ? )

With what I add in cmdCNT_Click (I set icX = 0), After you suppress all your lines, the first one to show will be the one with the index = 0

Hope that help, else write again!!!
 
Thanks a million.... i was going with index = 0
forgot to reset icx
icx is index control x

Aaron Fear is the mind killer!!!!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top