Hello All
I am getting used to VB.net - I remember (I think) in VB 6 that if a txtBox.text = "" then it was considered a blank field. I can't get this code to work - I keep getting the message box (error) but I want the ELSE statement to work if it is ( the fields) filled in.
Code
ThanksCode:Private Sub btnOrder_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnOrder.Click If txtName.Text = "" Or cmbBrand.Text = "" Or cmbStyle.Text = "" Or cmbSize.Text = "" _ Or (radMensShoes.Checked = False Or radWomensShoes.Checked = False) Then MsgBox("Please fill in all fields" & Environment.NewLine & "you may leave width unchecked") Else txtBox1.Text = ("Thank You " & txtName.Text & Environment.NewLine & "Men's Shoes:" & radMensShoes.Checked & _ Environment.NewLine & "Women's Shoes:" & radWomensShoes.Checked & Environment.NewLine & "Brand: " & cmbBrand.Text & Environment.NewLine & _ "Style: " & cmbStyle.Text & Environment.NewLine & "Size: " & cmbSize.Text & Environment.NewLine & "Width:" & chbWidth.Checked) End If End Sub
Rob




Reply With Quote