Re: Make default value sum to two other fields
Seems fairly obvious that you (unfortunately) won't be able to use the default value property as sum function in a table, since at the time when default value will be assigned to your sum field, the two fields to sum will yet be empty.
Originally posted by elisabeth
I have got 3 fields in a table.
Is there any way to make one field the sum of the other two fields as a default.
Everything I do seems to bring up error messages.
However, what you can do if the solution proposed above does not suit your needs, is make a query like
SELECT tblTable.Field1, tblTable.Field2, ([Field1]+[Field2]) AS SumOfFields1and2 FROM tblTable
and use it [i]instead[i/] of the table wherever you need it. Just don't forget to set the .locked property to 'Yes' if you use the query as form record source and place the field SumOf... on a form.
Replies based on my configuration: Windows XP / Microsoft Office Access 2003 unless specified otherwise.