CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 How do i validate this

Print topic Send  topic

Author Message
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  
  
View profile  Send private message
charles
Posted: 07/24/2005, 8:12 AM

Many thanks!
The code worked fine!
charles

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.