CodeCharge Studio
search Register Login  

Web Reports

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

YesSoftware Forums -> CodeCharge Studio -> ASP

 ccdlookup validation code based on field data

Print topic Send  topic

Author Message
JimbobGilb

Posts: 28
Posted: 12/07/2011, 1:29 AM

I want to throw an error up when data is incorrect but I need to do an either or formulae but not sure the best way. The idea is as bellow. Each works on its own but cannot figure the or bit out.

If PickedItems.ShippedBy.Value = "Export"

then

If CCDLookup (Ucase("PartNumber"), "PendingPicking", "PartNumber="& DBConnection1.ToSQL(PickedItems.PartNumber.value, ccsText) & "AND EnteredBY<>"& DBConnection1.ToSQL(PickedItems.ShippedBy.value, ccsText),DBConnection1) <> Ucase(PickedItems.PartNumber.value) Then
PickedItems.Errors.addError("Part number not shipped.")

else

If CCDLookup (Ucase("PartNumber"), "PendingPicking", "PartNumber="& DBConnection1.ToSQL(PickedItems.PartNumber.value, ccsText),DBConnection1) <> Ucase(PickedItems.PartNumber.value) Then
PickedItems.Errors.addError("Part number not shipped.")

I am sure it is something simple but it has got the better of me at the minute.

I look forward to a response,

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.

Web Database

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.