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!

Need to Return a zero value from a query.

Status
Not open for further replies.

qae

Technical User
May 24, 2002
19
GB
Good morning

I need assistance please.

I am running a query on an Access 2000 Database. The database consists of stock levels of Wholesale Items. I have run the query to return the results of all Items that have had goods recieved, I have for instance 100 diferent Items and have hag good reciepts on 75 of the Items, these values are returned correctly, What i need is to return a zero value for the remaining 25 Items.
attached is the query
]
SELECT TblDivision.Division_No, TblDivision.Division_name, TblBranch.Branch_No, TblBranch.Branch_Name, TblPeriod.Month, TblPeriod.year, TblPeriod.Month_desc, TblItem.Item_No, TblItem.Item_Name, TblSuppRec.rec_Qty
FROM (((TblSuppRec INNER JOIN TblBranch ON TblSuppRec.Branch_No = TblBranch.Branch_No) INNER JOIN TblDivision ON TblSuppRec.Division_No = TblDivision.Division_No) INNER JOIN TblPeriod ON TblSuppRec.Month = TblPeriod.Month) INNER JOIN TblItem ON TblSuppRec.Item_No = TblItem.Item_No;


I hope this makes sense? and any assistance is greatly appreciated. Thanks
 
Use the Nz function around any numeric fields that you want returned as zero if their actual value is Null:

Nz(TblSuppRec.rec_Qty,0) AS Qty


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top