473,625 Members | 2,733 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Calculating In Access

I have serious Access problems so please be gentle.

I have one table that stores the quantities and
net sales for thousands of Products.

I have another table that has fixed costs values
on a country level.

I need to apply a percentage (based on net sales) of
the fixed costs across the products.

This is no problem in Excel, how about in Access.

Example.

Product Table

Product Country Qty Sold Net Sales
Trash Can A US 1 5.00
Trash Can B GB 2 10.00
Paper Sack A US 3 3.00
Paper Sack B GB 4 4.00

Fixed Costs Table

Country Fixed Costs
US 20.00
GB 15.00

In Need Of:
calculated
field
Product Country Qty Sold Net Sales Fixed Cost
Trash Can A US 1 5.00 12.50
Trash Can B GB 2 10.00 14.29
Paper Sack A US 3 3.00 7.50
Paper Sack B GB 4 4.00 5.71

Formula = (Net Sales / (Total Country Net Sales))
* Fixed Cost

Any suggestions on how to do this in Access without
first doing it in Excel and importing?

Thanks In Advance (TIA)
Nov 12 '05 #1
1 2290
First, you need to create a query that rolls up the total NetSales by Country:

SELECT Country, SUM([Net Sales]) As NetTotal
FROM [Product Table]
GROUP BY Country

Save that as qryNetByCountry

Then create a query that joins the 2 tables and the new query together on on
the country field:

SELECT P.Product, P.Country, P.Qty, P.Net, (P.Net/N.NetTotal)*F.F ixedCost As
NetFixedCost
FROM qryNetByCountry N INNER JOIN ([Product Table] P INNER JOIN [Fixed Cost
Table] F ON P.Country = F.Country) ON N.Country = F.Country

DISCLAIMER: I have not tested any this....use only as a guide. The improtant
thing to gather are:

1) Create the qryNetByCountry query
2) Join that query along with the other tables
3) Do your calculation.
Nov 12 '05 #2

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

Similar topics

4
12671
by: John | last post by:
hey all..... alright, I am frusterated to the point of throwing my machine out the window (this board went down, trying to find stuff on google, this has been a nightmare) so I hope you guys can help me with a solution. This is what I am trying to do: Pretty much, there are two dates in my database, a start date, and an end
0
1509
by: peterleeds | last post by:
Could anyone explain why Access 2003 is continuously calculating a continuous form, when it works perfectly in previous versions? On reading previous messages I gather that overlapping controls cause this, but why? I use a hidden control underneath the whole line to highlight it when selected. If I cannot do this in Access 2003, how does one go about getting the
2
2528
by: kuhni | last post by:
Hi everybody! After searching newsgroups for a couple of hours, I now try asking directly (running the risk of asking again the same question). My problem is to predict when the size of the database (1GB I expect) is over 1GB by calculating the maximal number of data sets (tuple) added: 1. Is the following calculation for estimating the mdb file size in Access 97 correct: 1 integer field = 4 Byte
0
1777
by: robin9876 | last post by:
In an Access 2000 database on some forms 'Calculating...' is continuously displayed in the status bar window and the text of the control is automatically selected. The only workaround is switching to another application and back between each field that data is entered. I have tried this database on pc's that have office 2000 SP1a and SP3. How do investigate what is causing this calculating issue and how do I resolve it?
1
1571
by: Nixeh | last post by:
Hey guys, New to the forums but ive hit a snag whilst updating a Access Database at work. Currently trying to repair and maintain a database that has been built by 6 people all with even worse knowledge of access then me and its becoming a pain at least. My boss has just said that she wants a new field that displays the date of the patients 55th Birthday. Problem is there are 1500+ records on this database and ive had a play around...
0
8253
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8635
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
8354
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
8497
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...
0
7182
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6116
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
4192
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2621
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
1
1802
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.