Default Value to Currency

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi!

I have this query that I'm using in the form. The two fields "Travel" &
"Misc" is defined as currency but when I run the query it shows as blank.
What I want to accomplish is to use this query as template to build the
records with this two fields all showing zero dollar. so, each time user
select particular (catagory A (1-5), catagory B (1-20), catagory C (1-30)
etc.) items then shows all # of items with two fields zero. Please advise
me! Thanks

SELECT tblOtherCosts.ContractID, tblContractWP.ContractType,
tblContractWP.WP, tblContractWP.Program, tblOtherCosts.OtherCostsID,
tblOtherCosts.Travel, tblOtherCosts.Misc, tblOtherCosts.ContractTypeID,
tblOtherCosts.PeriodEndDateID
FROM tblContractWP LEFT JOIN tblOtherCosts ON tblContractWP.ContractTypeID =
tblOtherCosts.ContractTypeID;
 
You can use the Nz function:

.... Nz(tblOtherCosts.Travel, 0) AS Travel, Nz(tblOtherCosts.Misc,0) AS Misc
....

Note: If you modify those fields in the Table to have a Default Value of
zero, then new records will always place a zero in those fields.

Carl Rapson
 
Carl, thank you I appreciate your response. That works for the default value
but I think I have other issues.
 
Back
Top