![]() |
|
|||||||
| ASP & VBScript Forum Need help from a webmaster with ASP or VBScript, you may ask in this forum? |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Function never gets past the condition in the first elseif. Wont test for one empty and one 0 unless I put those conditions in the initial if or elseif. Any suggestions????
Function form1_OnSubmit() form1_OnSubmit = False Set theForm = Document.form1 If Len(Trim(theForm.MACONHAND.Value)) = 0 and Len(Trim(theForm.WINONHAND.Value)) = 0 Then MsgBox "You must enter a valid quantity for the batch.", vbCritical, "Need Input" elseif Trim(theForm.MACONHAND.Value) < 1 and Trim(theForm.WINONHAND.Value) < 1 Then MsgBox "You must enter a valid quantity for the batch.", vbCritical, "Need Input" elseif Trim(theForm.MACONHAND.Value) < 1 and Len(Trim(theForm.WINONHAND.Value)) = 0 Then MsgBox "You must enter a valid quantity for the batch.", vbCritical, "Need Input" elseif Len(Trim(theForm.MACONHAND.Value)) = 0 and Trim(theForm.WINONHAND.Value) < 1 Then MsgBox "You must enter a valid quantity for the batch.", vbCritical, "Need Input" else form1_OnSubmit = True End If End Function |
|
This ad is part of our Revenue Sharing program |