empty field comaprison and deleted column

undergrad

Registered User.
Local time
Today, 09:16
Joined
May 29, 2003
Messages
25
In this iif statment the query compares two fields. It works if the data is different or the same. However, if both fields are empty access returns it as a difference even though they both are empty fields. Is there any way to make access realize that if both fields don't have anything entered into them then the fields are the same???


Expr6: IIf(NewValue![Thermal Power, kW]=OldValue![Thermal Power, kW],Null,"oldvalue=" & OldValue![Thermal Power, kW])


Also, I deleted a entire field/Column from a base table in my application. I deleted it also from all the queries but I am still getting the enter parameter box every time i open a cetain form. the thing is the field where access is telling me to enter the data doesn't exist anymore.

thanks for any help
 
1. Use the Nz (Null to Zero) function. If the value is "NULL" you cannot use the comparison expressions.

Expr6: IIf(Nz(NewValue![Thermal Power, kW],"")=Nz(OldValue![Thermal Power, kW],""),Null,"oldvalue=" & OldValue![Thermal Power, kW])


2. Check to see if the Field is still referenced on the form. Check each controls "Control Source". Check to Forms properties (in particular the Data Source) to see if the Field is being referenced. One more place to check is Macros/Code Modules that are used by this form.
 
Thanks for the quick reply

on that Nz function, does that only work on empty fields or will that identify an empty field and treat all other fields as regular or does it mess up with fields with actual data in it

i found the problem on the second problem. thanks
 
wait I got it now. stupid question. Thanks alot travis that saved a big headache
 

Users who are viewing this thread

Back
Top Bottom