charles
|
| Posted: 07/20/2005, 4:35 AM |
|
Hi ,
i don't know if anyone can help me with this.
I have a record form with the following fields of listboxes..
account_no,
customer_id,
debit,
credit.
What i need to validate is that if a user selects account_no that begins with the digits 55 or 44,then the customer_id field cannot be left blank.How do i code this in asp?
regards/
charles
|
|
|
 |
eiden
Posts: 34
|
| Posted: 07/20/2005, 5:08 AM |
|
Try this:
Select Case Left(FormName.account_no.value,2)
Case "55"
If FormName.customer_id.value = "" then
FormName.errors.addError("Error message")
end if
Case "44"
If FormName.customer_id.value = "" then
FormName.errors.addError("Error message")
end if
End Select
|
 |
 |
charles
|
| Posted: 07/24/2005, 8:12 AM |
|
Many thanks!
The code worked fine!
charles
|
|
|
 |
|