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
|
|||
|
|||
Access Forms
I need to put calculations into a form so that it will add feilds together. I
can't find how to do this in the form information only in querys. If I set it up there will it affect my form? I hope Im asking the the question correctlly, I'm very new (self taught) to Access. |
#2
|
|||
|
|||
Access Forms
It is the same as in a query.
Source =Nz([Field1])+Nz([Field2])+Nz([Field3]) -- KARL DEWEY Build a little - Test a little "Kelly K" wrote: I need to put calculations into a form so that it will add feilds together. I can't find how to do this in the form information only in querys. If I set it up there will it affect my form? I hope Im asking the the question correctlly, I'm very new (self taught) to Access. |
#3
|
|||
|
|||
Access Forms
Kelly K wrote:
I need to put calculations into a form so that it will add feilds together. I can't find how to do this in the form information only in querys. If I set it up there will it affect my form? I hope Im asking the the question correctlly, I'm very new (self taught) to Access. You can do this either way. I'm inclined to think that it's better to do all the arithmetic you can in the underlying query as it seems to me that it's easier to understand that way. I have a billing system which (for example) has one table which stores price and quantity. I multiply them in a query to produce a "cost" field, and have a text box on my forms/reports which displays this value. However, you can set the "control source" of a control (a text box is one example of a control) to an expression based on any of the fields which are available from the "record source" of the form or report. It's very common to have a text box in a footer (group footer, page footer or report footer) whose control source is: = Sum([field of interest]) for example. It's worth fooling around with the "expression builder", which is a wizard which helps you put together expressions using fields and functions. Bit of a struggle at first, but it repays study. Does that help? Or should I have waited for the clearer head that the morning will surely bring? Phil, London |
#4
|
|||
|
|||
Access Forms
You can do this either way. I'm inclined to think that it's better to
do all the arithmetic you can in the underlying query as it seems to me that it's easier to understand that way. I agree, it's better to base a form on a query and calculated fields for your math. Then you simply use the calculated field as the ControlSource for your form control. The advantage of this approach is that you can also use the query as the source for any reports you need to create, and once again, the calculations are already done in the query. If you don't do it this way, but rather "do the math" in the form, and later need the same thing in a report, you'd have to "do the math" all over again in order to get it to appear in the report. -- There's ALWAYS more than one way to skin a cat! Answers/posts based on Access 2000/2003 Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...arted/200902/1 |
Thread Tools | |
Display Modes | |
|
|