Adding 2 fields

  • Thread starter Thread starter Bruce
  • Start date Start date
B

Bruce

I have information in the same table but in seperate fields, how can I add
the contents of one to the other?

Field = Projects + Field = RSS No


Thank you

Bruce
 
Hi Bruce,

If you are wanting to create a new field in your table and update it with the data from two other fields, then consider not doing that. It becomes redundant data and it is also a 'calculated field' - both of which are not considered to be good table design. However, you can do the 'calculation' on a form or a report and view the the information the way you want to see it.

For example, let's say that on your form you have two textboxes. One textbox is named is "txtProjects" and the other is named "txtField". On this form you place new textbox, name it txtProjectField and in the control source property of the new textbox you type:

=[txtProjects]&" - "&[txtField]

When the form is in from view, the new textbox will display something like this:

"RSS - 123"

If you don't want the dash between the two bits of data, write the formula like this:

=[txtProjects]&" "&[txtField]

and it will display "RSS 123".

Hope this helps.
 
I have information in the same table but in seperate fields, how can I
add the contents of one to the other?

Field = Projects + Field = RSS No

In a query. You really don't want to store all three fields.

Tim F
 
I want to do the same thing. But the same table will have more
calculation in it. If I can get the first to work then I can figure out
the rest. I want to creat a field "X" and this field will equal "A" +
"B" + "C" -"D". Can somebody help me with the correct syntax?
Thankyou.
Brad
 
Brad Rosevear said:
I want to do the same thing. But the same table will have more
calculation in it. If I can get the first to work then I can figure out
the rest. I want to creat a field "X" and this field will equal "A" +
"B" + "C" -"D". Can somebody help me with the correct syntax?

There is NO way to create a field in a table that holds a calculation and there
is no good reason to try. Build a query that has all of the fields in your
table PLUS a calculated field that uses the expression that you want. Then just
substitute the query any place you are currently using the table.
 
Back
Top