473,396 Members | 2,059 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Calculation problem in Access 2000

Hi!

Recently we, in Norway changed to three different VAT levels. All three
needs to be on the invoice program. This is easy obtained via a new
field and set the rowsource to valuelist and make the three values :
0;0,00;0,06;0,12;0,25.

However my problem is calculating the orderlines and make them be
summed in a textbox in the footer of the frmOrderlines.

Can anyone see what I'm surely missing?

=Sm((Nz([Price]*[Amount]*[Discount])+[GeneralTaxes]))*[VTA]

which I thought would produce a result.

Hope anybody can help me.

Me.Name

Mar 22 '06 #1
6 1659
Apart from some typos - like sm for sum and probably VTA for VAT....

Are any of the fields null (Price/Amount/Discount.....etc

If they are (or can be) then the nz function looks in the wrong place.

=Sum(((nz(Price,0)*nz(Amount,0)*(nz(Discount,0)) +
nz(GeneralTaxes,0))*VAT)

mind you I think discount should be (1 - nz(Discount,0))

Mar 24 '06 #2
No nulls, and I already use the NZ() function on all fields.
And the line should really be (as sum of each line):

=Nz([Price]+[GeneralTaxes])*Nz([Amount])*Nz(((1-[Discount])/100)*100)

and this works fine for the sum of each orderline

However, adding =Sum to it in the footer in a textbox suddenly just
stopped to work.

Could it be that I'm working on an access 2000 db in office xp, win xp
pro?

Because it just stopped to function!

Anyway, here's the calculation for a textbox in the footer of
frmOrderdetails:

=Sum(Nz(Price*Amount)) in the ControlSource property.

Botn fields are set correctly as moneyvalue and integer value and have
been working nicely until I loaded this access 2000 db into access xp.

Have a nice day!

But why it doesn't return any value I can't tell

cjb_kjb skrev:
Apart from some typos - like sm for sum and probably VTA for VAT....

Are any of the fields null (Price/Amount/Discount.....etc

If they are (or can be) then the nz function looks in the wrong place.

=Sum(((nz(Price,0)*nz(Amount,0)*(nz(Discount,0)) +
nz(GeneralTaxes,0))*VAT)

mind you I think discount should be (1 - nz(Discount,0))


Mar 28 '06 #3
Hi!

I solved the problem.

I just made a new frmOrderdetail and now it works.

So what could have been wrong?...u tell me :-)

Me.Name

Mar 28 '06 #4

<gs***@hotmail.com> wrote in message
news:11*********************@z34g2000cwc.googlegro ups.com...
Hi!

I solved the problem.

I just made a new frmOrderdetail and now it works.

So what could have been wrong?...u tell me :-)


Er, you needed to create a new frmOrderdetail? Probably the Amazing
Biodegradable Forms Feature, in one variation or another. That's sometimes
called the "white flash" (after a famous Candid Camera episode).
Mar 28 '06 #5
I have no idea why that solved the problem except it doesn't surprise
me.

I get the feeling Access has a few bugs and corrupts things
occasionally and no matter what you do it doesn't come right again
unless you recreate the object from scratch.

I find Access 2003 is worse for this than Access 2000.

One case that comes to mind. I have an application with several forms
that work in a similar way but with some differences eg Cheques,
payments, receipts etc. I had a combo box on one where the rowsource
was "Select ....Where ID = forms!FormA!FieldA".
I copied this combo box to another form and changed the select to
"Select....Where ID = forms!FormB!FieldA". Worked fine.
Then after I did some other changes on the form the combo box rowsource
reverted to the original query and of course wouldn't work. Changed it
again. Worked fine. Did some more changes to the form. Combo box
rowsource reverts to the original again. This same thing happened on
several forms.

Mar 29 '06 #6
"cjb_kjb" <cj*****@hotmail.com> wrote

I find Access 2003 is worse for this than Access 2000.


With all three Service Packs and more recent patches applied, Access 2000 is
finally reasonably stable; when delivered, it was arguably the worst release
every of Access (and that's going some, if you remember Access 95).

Obviously our experience varies, because I have not found Access 2003 to be
_less_ stable than Access 2000. I do not like its default of "online
primary" help, but haven't found it to be unstable.

Larry Linson
Microsoft Access MVP
Mar 30 '06 #7

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

Similar topics

2
by: Terry | last post by:
I have used the code provided in the PreciseDateDiff function at the following Access Web link to calculate the time change date (from Daylight to Standard time and vice versa): ...
15
by: Pres | last post by:
I am not an experienced programmer. I do have a question regarding workday calculations. I have 3 fields. CURDATE, NUMDAYS, CALCDATE After entering the first two fields, normally the current...
2
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...
1
by: cdelaney | last post by:
I have a form that I created a calculation on using 2003. The calculation works exactly like I want it to but ONLY on the first and last record. The calculation does not work/exist on records in...
2
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...
1
by: gjoneshtfc | last post by:
Hello, I have an asp page that is a table. In the table the end column is a calculation of other values, for example: ...
1
by: Colin Clark | last post by:
Hello, I have a database of scores for a sports club. I want to display a continuous subform showing a person's scores for the season along with a running calculation based on those scores (the...
6
by: andrewdb | last post by:
Hello, I needed help in finding how can I get access to to automatically populate a column where the value is just simple arithmetics between two other columns. For example: DIFF = Col4 - Col5...
1
by: =?Utf-8?B?a2FyaW0=?= | last post by:
Hello All, my question is how to get a text box or a label to display decimal #, like 0.9 or 1.4. what i'm trying to do is to convert from, for example, steps to miles. if 1 mile = 2000 steps,...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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,...
0
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...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.