jrussin
jrussin

Reputation: 77

Adding the values from two textbox's in MS Access

New to MS Access and had a question. I am trying to add the value from txtKits and txtFG. I want them to show up in a seperate textbox called txtTotal that returns the value (the textbox also needs to non editable). Here is what the form looks like:

Click to view image

If the user enters just one of the two calculation fields, then I get the attached output. I want it to not give that output. It can stay blank until both are entered. Any help or suggestions?

Upvotes: 0

Views: 445

Answers (1)

Erik A
Erik A

Reputation: 32642

You can check if both fields are numeric first in your calculated field:

=IIF(IsNumeric([Field1].Value) AND IsNumeric([Field2].Value); [Field1].Value + [Field2].Value; Null)

Upvotes: 1

Related Questions