English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

i want the total of five fields, if i put the value in all the fieds i get the answer correct, but if one field is blank i do not get the answer

2007-02-07 23:12:14 · 2 answers · asked by praaaaa 1 in Computers & Internet Programming & Design

2 answers

Sounds like you do not have a default value of zero defined in the table field(s). Go to the setup for the table and include a zero for the default value. Usually Access requires some entry to make a new record but will allow a record to be edited. If the edit erases the contents and no default value is present then a null is in your record. Placing a default value in the setup prevents nulls from being added to record fields. If a VB program is the source of records then you may have to correct its code so as to replace nulls with a default value.

You can either run an Update query to replace nulls with zeros OR run a select query which returns zeros for nulls or if not null the value and then execute a second query to compute the total.

2007-02-08 00:07:02 · answer #1 · answered by MarkG 7 · 1 0

set a default of 0 on your calcuated fields.

2007-02-07 23:53:30 · answer #2 · answered by Dan M 2 · 0 0

fedest.com, questions and answers