SteveL13
asked on
How replace empty number field with a "0.00"
On a form field I have a number field. It the user clears the value in the field I want to replace it with a 0.00.
I've tried this but it doesn't work: (the field name is "1000"
=IIf([1000]="",0,[1000])
I've tried this but it doesn't work: (the field name is "1000"
=IIf([1000]="",0,[1000])
If this is a numeric field...it will not = "".
iif(isnull([1000]),0,[1000 ])
scott c
iif(isnull([1000]),0,[1000
scott c
Plus... you can forma a 0 to look like 0.00 ... but 0.00 is not a legitimate number.
1.0 = 1
1.1 = 1.1
0.00 = 0
etc.
scott C
1.0 = 1
1.1 = 1.1
0.00 = 0
etc.
scott C
ASKER
IIf(Nz(1000.value) = vbNullString,0,[1000]) did not work.
This should do for the value in _another_ field than [1000]:
=Nz([1000],0)
/gustav
=Nz([1000],0)
/gustav
If you only have this field, use this in the AfterUpdate event:
If IsNull(Me![1000].Value) Then
Me![1000].Value = 0
End If
/gustav
If IsNull(Me![1000].Value) Then
Me![1000].Value = 0
End If
/gustav
ASKER
=Nz([1000],0) did not work.
If IsNull(Me![1000].Value) Then
Me![1000].Value = 0
End If
did work but I have 45 fields to code.
If IsNull(Me![1000].Value) Then
Me![1000].Value = 0
End If
did work but I have 45 fields to code.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
IIf(Nz(1000.value) = vbNullString,0,[1000])