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
|
 |
 |
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 |
 |
 |
|