Validating Fields

Trinity

New member
Joined
Jun 17, 2006
Messages
1
Programming Experience
Beginner
Question : XYZ Communications needs an application to accept order details. the
details to be accepted include order number, date, customerID, product
ID, cost, and advance amount. When a user clicks the SAve button after
entering order details, the applciation should verify that none of the
fields is left blank and display an appropriate message.

My Code :

Private
Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim OrderNumber As Integer, OrderDate As Date, CustomerId As Integer, ProductId As Integer, Cost As Integer, Advance As Integer
OrderNumber = txtOrdNo.Text
OrderDate = DateTimePicker1.Value
CustomerId = txtCustId.Text
ProductId = ComboBox1.SelectedValue
Cost = txtCost.Text
Advance = txtAdv.Text
If txtOrdNo.Text <> "" Or DateTimePicker1.ToString <> "" Or txtCustId.Text <> "" Or ProductId.ToString <> "" Or txtCost.Text <> "" Or txtAdv.Text <> "" Then
MsgBox("Welcome to the Jungle")
Else
MsgBox("Fill up the jungle")
End If

Plz make the changes and rectify the code so that i get the desired output
 
Back
Top