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!

I can't get the Nz function to work for me

Status
Not open for further replies.

jlathem

Technical User
Jul 25, 2010
27
I am not sure if I am using the correct syntax for Nz or even if I am using the function in MS Access 2003 properly.

I got the example from

but can’t get it to work form me.

In a subform I am getting a Sum of a Control called Disp_Dollar
=Sum([Disp_Dollar])

If there are no records found in the table I need a value of 0 to be returned.

I tried several deferent versions but no luck.

My last attempt

Private Sub Form_Load()
'chceck to see if the field is NULL, if so give it a value of "0"
If Nz(Me.[Disp_Dollar], "0") = "0" Then
End If
End Sub

I have tried using this script in On Load and On Open (I am not sure what the deference is between the two)

Anyone have any suggestions?
 
Your question has been answered on another forum.

PoppaSmurf
allanmurphy47@gmail.com
 
I apologize. I didn't think about coming back and posted that.

I'll start doing that from now on.

Thank you for catching it and letting me know.

James
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top