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

Function in Access VBA?

Status
Not open for further replies.

VBUser77

MIS
Jan 19, 2005
95
0
0
US
Is there a function in Access VBA that converts a negative value to 0. I know there is a NZ function that converts null values to zero. I am just wondering if we have a function that converts negative values to zero.

Thanks a lot in advance.

Jay
 
One way:
IIf([TestField] < 0, 0, [TestField])
Another way:
[TestField] * -([TestField] > 0)

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top