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

 Using IF statement with BeforeShow event

Print topic Send  topic

Author Message
Don_S

Posts: 50
Posted: 11/21/2005, 3:07 PM

Hi everyone,

Here's what I am trying to do... I have a BeforeShow event on a Form that as it stands now adds a value to a textbox from an other textbox: tbl_Calls1.Relation.Value=tbl_Calls1.Call_ID.Value

What I want it to do is ONLY add the value if Relation is NULL. I tried just adding an IF statement in front:
'IF tbl_Calls1.Relation.Value=NULL Then tbl_Calls1.Relation.Value=tbl_Calls1.Call_ID.Value' but that did not seem to work. I guess what I need to do is send a call to the DB to see if the Value is Null. How can I do this?

Thanks,
Don
View profile  Send private message
Edd


Posts: 547
Posted: 11/21/2005, 4:07 PM

Don
I think CCS protects you from Nulls by changing them to Empty when you ask for a value,

Anyway you can use IsNull or IsEmpty

IF IsEmpty(tbl_Calls1.Relation.Value) Then
tbl_Calls1.Relation.Value=tbl_Calls1.Call_ID.Value'
End If

Edd
_________________
Accepting and instigating change are life's challenges.

http://www.syntech.com.au
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.