Hi
i want to add a name into table but before that i want to check wheather the name is already in combo box or not that's why
i am using the follwoing code but it show the error
InvalidArgument =Value of '0' is not valid for 'index'. Parameter name: index
my code is
For i = 0 To frmMain.cboServ erName.Items.Co unt
If LCase(Trim(txts ervername.Text) ) = LCase(frmMain.c boServerName.It ems(i)) Then
MsgBox("Name Already Exist, Please Choose Other Name", MsgBoxStyle.Inf ormation, "Insert Error")
txtservername.F ocus()
Exit Sub
End If
Next
the cboservername a combo box and it is empty
please give some help
best reGArds
varinder
i want to add a name into table but before that i want to check wheather the name is already in combo box or not that's why
i am using the follwoing code but it show the error
InvalidArgument =Value of '0' is not valid for 'index'. Parameter name: index
my code is
For i = 0 To frmMain.cboServ erName.Items.Co unt
If LCase(Trim(txts ervername.Text) ) = LCase(frmMain.c boServerName.It ems(i)) Then
MsgBox("Name Already Exist, Please Choose Other Name", MsgBoxStyle.Inf ormation, "Insert Error")
txtservername.F ocus()
Exit Sub
End If
Next
the cboservername a combo box and it is empty
please give some help
best reGArds
varinder
Comment