Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

nz function

Status
Not open for further replies.

samotek

Technical User
May 9, 2005
197
BG
Will you help me build the proper code including cases when there is a Null value.I have the following code :
If Me![Stueck] <> Nz(Me!In - Me!Out, 0) Then
Me!Stueck.ForeColor = 255

However i do not want to show this color when there is no value in the Out text box.
For example
in out stueck
15 15
i cannot get this solution.The above code gives me a red color when i have In = 15, stueck = 15 and nothng in out.



 
try nesting IFs

if isnull(out) then
Me!Stueck.ForeColor = 0
else
If Me![Stueck] <> Nz(Me!In - Me!Out, 0)
Me!Stueck.ForeColor = 255
else
Me!Stueck.ForeColor = 0
end if
end if


SeeThru
Synergy Connections Ltd - Telemarketing Services
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top