A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Access Forms



 
 
Thread Tools Display Modes
  #1  
Old February 23rd, 2009, 10:19 PM posted to microsoft.public.access.gettingstarted
Kelly K[_2_]
external usenet poster
 
Posts: 1
Default 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  
Old February 23rd, 2009, 11:55 PM posted to microsoft.public.access.gettingstarted
KARL DEWEY
external usenet poster
 
Posts: 10,767
Default 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  
Old February 23rd, 2009, 11:56 PM posted to microsoft.public.access.gettingstarted
Philip Herlihy
external usenet poster
 
Posts: 292
Default 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  
Old February 24th, 2009, 02:05 AM posted to microsoft.public.access.gettingstarted
Linq Adams via AccessMonster.com
external usenet poster
 
Posts: 1,474
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 06:56 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.