473,551 Members | 2,775 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

form sum calculation error

Hello all,

I have identical design for form and report but I am getting
calculation error on form and everything is OK on report. The form and
report are build up on SQL statement. The calculation is very simple.
The calculation is done in an underling query if I can call it a query
or I should call it a SQL statement. It looks like a query but it is
not saved as the query. The calculation in that query is very simple -
ExtendedPrice:[Price]*[QTY]. Then I have a field as follows:
=Sum([ExtendedPrice]) and it is OK on report but it returns error on
form. The funny think that when I tried differnt expression and
approaches this expression returns number after a change. But as soon
as form is saved and opened again it displays Error. Any idea that I
have wrong?

Jul 14 '06 #1
4 3748
vg*****@telus.n et wrote:
Hello all,

I have identical design for form and report but I am getting
calculation error on form and everything is OK on report. The form and
report are build up on SQL statement. The calculation is very simple.
The calculation is done in an underling query if I can call it a query
or I should call it a SQL statement. It looks like a query but it is
not saved as the query. The calculation in that query is very simple -
ExtendedPrice:[Price]*[QTY]. Then I have a field as follows:
=Sum([ExtendedPrice]) and it is OK on report but it returns error on
form. The funny think that when I tried differnt expression and
approaches this expression returns number after a change. But as soon
as form is saved and opened again it displays Error. Any idea that I
have wrong?
What happens if you enter Sum([Price]*[QTY]) in the form instead?
Jul 14 '06 #2
check the form's recordsource property. You need to bind your form to
the table or query that contains the field ExtendedPrice. Make that
table or query the recordsource for the form. In order to use this kind
of expression on a textbox on a form, the form must have a corresponding
recorsource to pull the data from. Then place the expression

=Sum([ExtendedPrice])

in the ControlSource of an unbound textbox. That should fix your
problem.
Rich

*** Sent via Developersdex http://www.developersdex.com ***
Jul 14 '06 #3
I tried to bound calculated field and I tried to do calculation like
that. In both cases I have Error. But when I open form and do first
time changes for example from =Sum([Price]*[QTY]) to
=Sum([ExtendedPrice]) I am getting results. As soon as form saved and
opened again the Error is coming back. I wonder if some of the form
property effects it. With formulas I am Ok as the same formulas are
used in invoice report and report works well. Is there something in
calculation that you can do in report but you can not do in form?
Thanks/ Vadim
salad wrote:
vg*****@telus.n et wrote:
Hello all,

I have identical design for form and report but I am getting
calculation error on form and everything is OK on report. The form and
report are build up on SQL statement. The calculation is very simple.
The calculation is done in an underling query if I can call it a query
or I should call it a SQL statement. It looks like a query but it is
not saved as the query. The calculation in that query is very simple -
ExtendedPrice:[Price]*[QTY]. Then I have a field as follows:
=Sum([ExtendedPrice]) and it is OK on report but it returns error on
form. The funny think that when I tried differnt expression and
approaches this expression returns number after a change. But as soon
as form is saved and opened again it displays Error. Any idea that I
have wrong?
What happens if you enter Sum([Price]*[QTY]) in the form instead?
Jul 15 '06 #4
Try an experiment. Create a new form just with one text box and all the
properties of the form are default properties. Set the recordsource of
that form to the table/query that has the data you need to calculate.
In the textbox enter your calculated expression

=Sum([ExtendedPrice])
Open the form and see if that works. Then save the new form and re-open
it to see if it still works. If it works then you can start modifying
the form to your needs. Each time you make a change to the form - open
the form to see if it still works. After a change, if you get an Error
message in the textbox, then make a note of the change you made after
you receive the Error message in the textbox. That change is what is
causing your problem. Then, if you can't figure out what the problem
is, you can post the change that you made after you receive the Error
message.

Rich

*** Sent via Developersdex http://www.developersdex.com ***
Jul 16 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
7424
by: Newbie | last post by:
OK, this may be impossible since I'm using 3rd party shopping cart ASP software, but I've been able to finagle a lot of other stuff I thought wouldn't work, so here we go: I'm using a form in which users enter numbers to be calculated into a square footage cost. Upon submitting, the results page uses ASP to give the total and the chance to...
3
6326
by: Pat | last post by:
Hello, I've used Sum() to total bound fields on a continuous form with no problem. However, I now have a continuous form, on which I use an unbound field to calculate the number of hours between two times stored in a record (bound fields). This field is called txtDuration. On my footer, I've created another unbound field named...
1
3819
by: Yuki | last post by:
Thanks for taking the time to look at my problem. I keep getting a #Name error from a calculated field on a form. It is a text box field unbound. The calculation is very very simple yet I still get the #Name error. The formula is =-. I checked the field names and they are spelled correctly. I made sure they are numeric and they are. I...
2
3896
by: Del | last post by:
Thanks in advance for any help. I have a database that was created in Access 2000. Several users have been upgraded to Access 2003. Since upgrading to 2003 we have noticed that some of the calculated fields are not being populated. The database is a samll invoicing database on the form and report we have columns call Unit Cost. This is the...
1
309
by: Paolo | last post by:
Hello, I have a form based on a query that has four fields (a, b, c and d). The query get's its data from a table. The last field of my form is a calculated field (b*c/d). The field d is not in my table therefore is used on my form just to display the calculation. I now need to add a text box to display the sum of the field d but I am...
2
2343
by: DebbieG | last post by:
I have no idea how to start with this one. I have a subform where records could look similar to: Infraction Date Points 01/01/2000 3 06/01/2002 1 Somehow, I've got to calculate the points the driver has as of the current date. For instance, in the above example:
2
2652
by: semutmerah | last post by:
hi.. my english maybe wrong.. but hope somebody can understand me :) I did created 3 forms. "MainForm" , "CalForm" , "WaitForm". On "MainForm", I did put a command button called "Run". On "CalForm", there were some unbound "text box" which have some calculation
2
2381
by: campos | last post by:
Hi all, I ran into a headache problem. I have a windows form with a progress bar on it. Then I new a thread to do calculation for a long time. I want the progress bar to show the calculation progress. So I use a shared variable in calculation thread to allow main thread read it periodically in order to show the progress. Quesion comes out....
12
12893
by: GLEberts | last post by:
I made an addition to a form I was using and it threw a wrench into the works for my ability to adjust the calculation. I am trying to sum a unbound control calculation in a continous form. question: can you only sum a bound control name? is that why I am getting an error? question: must I use a query to do the calculation for me?...
0
7565
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7492
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7768
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8002
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7522
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7847
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5406
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3534
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1981
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.