If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Adding 2 fields
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 |
#2
|
|||
|
|||
Adding 2 fields
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. -- rpw "Bruce" wrote: 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 |
#3
|
|||
|
|||
Adding 2 fields
"Bruce" wrote in
: 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 |
#4
|
|||
|
|||
Adding 2 fields
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 rpw wrote: 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. |
#5
|
|||
|
|||
Adding 2 fields
"Brad Rosevear" wrote in message
... 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. -- I don't check the Email account attached to this message. Send instead to... RBrandt at Hunter dot com |
#6
|
|||
|
|||
Adding 2 fields
Brad,
Can you explain a little more about your need? Is there a reason for storing the results of a calculation in the table? What do "A" and "B", etc. represent - tables, field names, numbers, text, what? Also, what Rick Brandt stated about having a field in a table do the calculation is correct, although there are methods of updating a table with the results of a calculation. In MOST cases, storing the result of a calculation is redundant and considered to be non-normalized table design, however, there are times when it is advantageous to do so. Post back to this thread and we'll try to help. -- rpw "Brad Rosevear" wrote: 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 |
Thread Tools | |
Display Modes | |
|
|