473,836 Members | 1,520 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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,1 2;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 1683
Apart from some typos - like sm for sum and probably VTA for VAT....

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

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*A mount)) 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.....et c

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******** *************@z 34g2000cwc.goog legroups.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!Fie ldA".
I copied this combo box to another form and changed the select to
"Select....Wher e ID = forms!FormB!Fie ldA". 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*****@hotmai l.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
2535
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): http://www.mvps.org/access/api/api0024.htm But looks like for this week only, there is a small error in the calculation in the 'GetSundate' function included in the code. You can see what I mean by adding the code below (copied directly from the above link)...
15
3619
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 date and for example 10 (10 day period) I need the CALCDATE to pass me the calculated date taking into account workdays and holidays. In other words, the 10th business day. How is this done? Thanks for any help...
2
3917
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 actual cost of the part and is pulled from our parts master table and is displayed in a sub form...
1
2279
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 between .. I have checked many of the properties to see what got set unintentionally that might make only the first and last record show the values. Has anyone experienced this? I'm baffled.
2
2474
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:
1
1560
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: <%=(RS1.Fields.Item("Won").Value)+(RS1.Fields.Item("Drawn").Value)+(RS1.Fields.Item("Lost").Value)%> To be complete: this is placed in the table instead of RS1.Fields.Item("Played").Value
1
2020
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 handicap), i.e. 3 fields per line in the subform showing date, score, handicap. The handicap needs to be calculated in VBA code as it is fairly complex to work out and depends on previous scores as well as the current score. I can get a query to...
6
2348
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 where Diff is Col6. I tried setting default value as " = - " which are labels for my columns but access gives me an error saying that Database engine does not recognize the field stop. I am using acess 2000 and running it on Windows 2000...
1
1752
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, then if i put anything less than 2000 it show as a zero (0). so how do i get it to be .#(point something)? Thanks for all your help.
0
9671
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10854
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10558
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10600
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
10257
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7794
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5651
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5829
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3116
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.