Error When Inserting Null Value Into Numeric field

chathag

Registered User.
Local time
Today, 12:41
Joined
May 22, 2009
Messages
32
I have several text boxes which hold numeric values. Using an INSERT INTO query (which is activated on a button click) the numeric values are inserted into a number fields within a table.

If one or more of the textboxes are empty and the button is clicked an error is returned. I have set the default value of the textbox to 0 as a short term fix.

How do I get round this issue?
 
Have you got 0 as the default value in the table properties. This will ensure that no numeric field will contain a Null value. sometimes this is not appropriate as you need to be able to distinguish between 0 and Null values. For example stock levels for new items should have a value even if this value is zero. If the field has a null value this implies that the value has not been recorded correctly or missed out all together.

David
 
I have used the nz function in my query and that seems to have done the job.

:0)
 

Users who are viewing this thread

Back
Top Bottom