By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,745 Members | 1,382 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,745 IT Pros & Developers. It's quick & easy.

Sum displayed in a field

P: 7
Inside a table, I have many fields. I would like Field1 * Field2 and store the result into Field3. I have a form which users can add records in, and I would like Field3 to be set automatically. The form adds data into my table.

I know how to use the Access Expression builder, but I can't add the expression in design view of the table. And it doesn't seem to work when I use it on the "Add Record" form.

Thank you.
Jun 12 '07 #1
Share this Question
Share on Google+
1 Reply

hyperpau
Expert 100+
P: 184
Inside a table, I have many fields. I would like Field1 * Field2 and store the result into Field3. I have a form which users can add records in, and I would like Field3 to be set automatically. The form adds data into my table.

I know how to use the Access Expression builder, but I can't add the expression in design view of the table. And it doesn't seem to work when I use it on the "Add Record" form.

Thank you.


There are different alternatives for what you want to do but
I'll give you the easiest ways based on the information you typed in.

first things first, you cannot do that in the table.
Tables can only be used to store information.
No calculations of any type can be done.

I suggest you create a query based on the table. remove Field3 before this.
So it's just an exact replica of your table, it's just that it's a query.

Now on the design view of query, go to any blank columns.
type this.
Field3: [Field1] + [Field2]

(you can replace "Field3" with the name you want to name that Field.)

If you go to the datasheet view of the query, you will now see
that they are added, assuming they are numbers.

If they are characters, then you might want to add additional spaces or characters between them.

Field3: [Field1] + " " + [Field2] or
Field3: [Field1] + "," + [Field2]

Then This query is where you would base your form.

Hope that helps.
Jun 13 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.