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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Subtracting with nulls 1

Status
Not open for further replies.

MICKI0220

IS-IT--Management
Jul 20, 2004
337
0
0
US
I have a query that uses two tables. The join takes all the records on the first table with only those that match in the second table. I then subtract a field called negative carryover from the other. I am trying to get a new negative carryover. If there was not a matching record in the second table, then I get a blank negative carryover instead of what the negative balance was in the first table. How do I get this to show up?
 
use the nz function
table1.[negative carryover]-nz(table2.[negative carryover]-,0)
 
Howzit

Try

Code:
[field1]-nz(field2],0)

Take it Easy
Man with one chopstick go hungry
 
Hey pwize - sorry you musta posted while I was typing. Cheers

a little typo in mine

Code:
[field1]-nz([field2],0)


Take it Easy
Man with one chopstick go hungry
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top