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

1 option button + 2 textboxs + 1 command button = help

Status
Not open for further replies.

compcad

Programmer
Mar 22, 2002
52
0
0
US
is what my problem is, when i click on the radio button (option2) i dont want the cmdPrint_Singles.Enabled = True to be enabled until after i enter values in both the textboxs called (txtValue and Text2) how would i do this without clicking on (option1) and then going back to (option2)

Private Sub Option2_Click()

If Option2.Value Then
Label2.Enabled = True
Label24.Enabled = True
Label25.Enabled = True
Text2.Enabled = True
txtValue.Enabled = True
cmdPrint_Singles.Visible = True
Label1.Enabled = False
If txtValue > "" And Text2 > "" Then
cmdPrint_All.Visible = False
cmdPrint_Singles.Enabled = True
End If
Text4 = Text3
Prize = "select prizeid, prizename, marketvalue from prize where prizeid like '" & Text4.Text & "*'"
End If

End Sub

thank you
stephen mentzer
 
In the textbox_change event set a boolean to true or false depending on Len(textbox.text)

Use those boolean values along with the radio button value for your logic.

Or you can use Len(Text) as a boolean. Empty string returns Len of zero (equates to false), any other length returns positive integer (equates to True)

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'If we're supposed to work in Hex, why have we only got A fingers?'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top