CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 Add error to grid if validation fails.

Print topic Send  topic

Author Message
RES

Posts: 21
Posted: 10/04/2007, 1:45 PM

I have a search box and an editable grid on the same page. When a search is completed I want to do an additional validation to ensure that the account number being entered isn't already activated. If it has been activated I want to add an error that says "account already activated."

I've tried this snippet of code in a few of the different events but I can't get the right outcome.
If (CCDLookup("ACCOUNT_MAIN", "PDACCOUNT_MAIN","ACCOUNT_MAIN=" & "'" & ccGetParam("s_account_number","") & "'", DBPOM)) <> "" then   
  
CUSTOMER.Errors.Adderror("Account Already Exists")  
  
End if  

Any help is appreciated.

_________________
RES
View profile  Send private message
RES

Posts: 21
Posted: 10/05/2007, 7:01 AM

anybody?

I found out that the condition is executed accurately. If i replace the then condition with a Customer.Visible = False it gets executed.

I tested it in the before show event. but I can't get an adderror to execute. I think I may need some extra line of code or a different event.
_________________
RES
View profile  Send private message
Oper


Posts: 1195
Posted: 10/07/2007, 2:31 PM

On validate (event)
_________________
____________________________
http://www.7bz.com (Free CMS,CRM Developed in CCS)

http://www.PremiumWebTemplate.com
Affiliation Web Site Templates

Please do backup first
View profile  Send private message

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.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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