Insert Value of 0

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

Guest

Would like to insert an expression to a query showing if quantity equals
blank insert 0. Thanks for the help.
 
Define "blank" --- is that an empty string? a null value? something else?

Look up IIf function in the Help files. It's commonly used for this type of
substitution.
 
Assuming by blank you mean Null, use this:
MyExpression:NZ([NameOfQuantityField],0)

MyExpression will equal Quantity when Quantity has a value and will equal 0
when Quantity is Null.
 
The formula being used is Calc IG: NZ([InwardsGoods]![StockCount],0). This
seems to work; however, the quantities become left justified. Is there away
to right justify them.

Query is against Linked tables.

I also tried using "IIF" but without any luck.

Thanks again!



PC Datasheet said:
Assuming by blank you mean Null, use this:
MyExpression:NZ([NameOfQuantityField],0)

MyExpression will equal Quantity when Quantity has a value and will equal 0
when Quantity is Null.

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
(e-mail address removed)
www.pcdatasheet.com



quickstudy said:
Would like to insert an expression to a query showing if quantity equals
blank insert 0. Thanks for the help.
 
Try Calc IG: CLng(NZ([InwardsGoods]![StockCount],0))

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
(e-mail address removed)
www.pcdatasheet.com


quickstudy said:
The formula being used is Calc IG: NZ([InwardsGoods]![StockCount],0). This
seems to work; however, the quantities become left justified. Is there away
to right justify them.

Query is against Linked tables.

I also tried using "IIF" but without any luck.

Thanks again!



PC Datasheet said:
Assuming by blank you mean Null, use this:
MyExpression:NZ([NameOfQuantityField],0)

MyExpression will equal Quantity when Quantity has a value and will equal 0
when Quantity is Null.

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
(e-mail address removed)
www.pcdatasheet.com



quickstudy said:
Would like to insert an expression to a query showing if quantity equals
blank insert 0. Thanks for the help.
 
Back
Top