473,396 Members | 1,671 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.

access how do i create a formula?

7
hey everyone..thank for making such a helpful site

i am going to tell you the backround and then proceed in telling you my problem

i studied access about 2 years ago so.. my knowledge is a little limited

ok basically i have created a table for the suppliers which we use in our company...
one of my columns is called Sub Total , the following column is called VAT and thus Amount Including VAT
i was wondering if when entering the Sub total and then clicking the VAT column.. is there a way in which acess can automatically calculate the VAT and also if there was a way in which acess can calculate the amount including the VAT
i am thinking there should be a way such as a formula or a rule which we can enter..
please let me know as soon as possible if anyone knows the answer to my problem
thank you
regards Noor
Jul 21 '08 #1
8 6233
hjozinovic
167 100+
Hi Noor,

Usualy calculations are used in Queries.
try to make a query based on your table and then you can calculate totals in there.
Also try to search access help for 'calculated fields' or 'calculated controls'

regards,
h.
Jul 21 '08 #2
nawara
7
Hi Noor,

Usualy calculations are used in Queries.
try to make a query based on your table and then you can calculate totals in there.
Also try to search access help for 'calculated fields' or 'calculated controls'

regards,
h.
Hi H,
why thank you very much for ur reply H,
ok if i was to create a query then wat would i need to write in the criteria?
i am assuming along the lines of sumthing like this =[sub total]*[100]/[17.5]?
and also if i was to write that formula... would it automatically work it out for me everytime i enter a new supplier?
Jul 21 '08 #3
hjozinovic
167 100+
Hi H,
why thank you very much for ur reply H,
ok if i was to create a query then wat would i need to write in the criteria?
i am assuming along the lines of sumthing like this =[sub total]*[100]/[17.5]?
and also if i was to write that formula... would it automatically work it out for me everytime i enter a new supplier?

hi N.

You really are 'rusty', aye? :-)
No problem, I'll be glad to help you.

I attached a sample for you here (at the bottom)
and for your secon q. yes it's applied to all new records every time you add or change something.... like excel sheet.
Attached Files
File Type: zip Sample.zip (11.2 KB, 542 views)
Jul 21 '08 #4
nawara
7
Hi H,
why thank you very much for ur reply H,
ok if i was to create a query then wat would i need to write in the criteria?
i am assuming along the lines of sumthing like this =[sub total]*[100]/[17.5]?
and also if i was to write that formula... would it automatically work it out for me everytime i enter a new supplier?

hi N.

You really are 'rusty', aye? :-)
No problem, I'll be glad to help you.

I attached a sample for you here (at the bottom)
and for your secon q. yes it's applied to all new records every time you add or change something.... like excel sheet.



:O:O:O bloody hell am so thick!!!!
is that all it was
seriously thank you soo much
:):) you r soo sweet
[flower for u]
Jul 21 '08 #5
nawara
7
ryt am stuck again
ufffffffff!
right wen i am writing 17.5% and tabbing onto the next colum which is VatAmount... its not calculating it:S:S:S:S:S
does this site have an instant messanger i need 24 hour support due to my stupidity?
lol
thanks
Jul 21 '08 #6
Stewart Ross
2,545 Expert Mod 2GB
Hi Noor. Problem is that you have included the calculated field in your table - the total including VAT - which is not the normal way to do it. Rule is not to store fields which are derived by calculating values from other fields.

A line subtotal can be calculated from the VAT (tax) rate stored, along with the unit price of the goods and the quantity: SubTotal: Qty * UnitPrice* (1+VATrate). Similarly for the VAT subtotal: VATAmount: Qty * UnitPrice * VATrate.

If you do want to store these values in your table as you are doing at present (for some reason) the values cannot change until you update the subtotals using the After Update events of the VAT rate, quantity and unit price controls on your form, a less easy option (though hardly difficult).

-Stewart
Jul 23 '08 #7
nawara
7
Hi Noor. Problem is that you have included the calculated field in your table - the total including VAT - which is not the normal way to do it. Rule is not to store fields which are derived by calculating values from other fields.

A line subtotal can be calculated from the VAT (tax) rate stored, along with the unit price of the goods and the quantity: SubTotal: Qty * UnitPrice* (1+VATrate). Similarly for the VAT subtotal: VATAmount: Qty * UnitPrice * VATrate.

If you do want to store these values in your table as you are doing at present (for some reason) the values cannot change until you update the subtotals using the After Update events of the VAT rate, quantity and unit price controls on your form, a less easy option (though hardly difficult).

-Stewart
right i see..
and were would i do these sums exactaly?
sorry if am buggin you with a million questions
though i really appreciate your replies
Jul 23 '08 #8
Stewart Ross
2,545 Expert Mod 2GB
As hjozinovic said in post 2, these calculations are done in Access queries. Base tables are where the data is stored, and should never be accessed directly by users. As developers we can define queries, in which we can include additional calculated fields to do things like calculate totals etc., and we then base user forms, reports and the like on these queries. You have had sample databases provided by posters - you should look at the examples provided, and in the one supplied with Access (the NorthWind example database) which is very useful for showing how to develop simple forms, queries and reports for users.

-Stewart
Jul 23 '08 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Darren | last post by:
I have been attempting to create a reservation planning form in excel that imports Data from an Access database and inserts that information automaticly into the correct spreed sheet and the...
14
by: Scott Gorman | last post by:
I have a report with a sub report for an income / expense report for church. My expense report is the sub report. My question is, when I run the report, it prompts me 2-3 times for the parameters...
5
by: jillandgordon | last post by:
I hope this group does not mind the most basic questions. I am trying to teach myself Access in two different versions. My company now uses Access 97 but, in the next few months, will be...
5
by: nedian | last post by:
Hello I am student and trying to learn access.I am having problem in making a program can any one help me? i wanted to make 2 tables in access and then create a link.First i am telling u what...
15
by: Wes Groleau | last post by:
When I try to import from Access, the DTS wizard only allows me to import tables and queries. OK, I'm not surprised the "macros" and reports don't come over. But it executes each query, and...
6
by: Stormy | last post by:
I want to create a query formula in Access. I have 2 columns that have dates eg: 02/03/06 - from those 2 columns I want access to add the 2 dates and give me a number. I am stuck on what criteria...
0
by: toton.basak | last post by:
In C++ any i can simulate some restricted access modifiers based on association & inheritance? eg, class BombMaker{ private: void makeAtomBomb(){ std::cout<<"making atom bomb\n"; } int...
2
by: welshkaiboy | last post by:
Due to the size of the data I have to manipulate I need to apply a excel formula in access which determines date of manufacture from a serial number 716001 so I use...
24
by: joeldault | last post by:
Question For Microsoft Access Data Base -------------------------------------------------------------------------------- I am Trying to create a single formula that would do the following: If...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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,...
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
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...

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.