Default Value Not showing

  • Thread starter Thread starter Lushman
  • Start date Start date
L

Lushman

Guest
I have created a Database with some currency fields with a Default value of Zero.

Unfortunately on the Form I created where I text boxes which are linked to fields they are shown with no value and you have to enter a '0' into the field for it register the value.
This is playing up my Calculations and reports.

I have set the default value in the Field and on the Form. I have other fields where I have set the same default value and they are working.

Any ideas on how to resolve this one.


cheers
 
try the if is null function on the on current event of the form..

If IsNull[yourfield] Then [yourfield] = 0
 
If you have existing records that contain "Null" values ... you will need to manually change the nulls to 0 or create an Update query to loop through the existing records and convert the nulls to a 0 value.

You also could use the Nz() function to convert a null value to a 0 value within your calculation.

Nz([Field1]) + Nz([Field2])

If either value is null ... the the Nz() will return a 0 for the specific field value.

HTH
RDH
 

Users who are viewing this thread

Back
Top Bottom