i ned help on control saource

N

nawara

hey i am having difficulties
basically i have 4 frilds named:
1)sub total-( this is the total not including the vat)
2) VAT-( this is wther the vat is 0.00 or 0.175) 0.175 being the vat rate we
use in the UK.. for this feild i created a drop down list which consisters of
:
0.00
0.175
3) VAT (T1)- Vat (t1) is the sum of sub total * VAT
4) Total including VAT- (this is the sum of sub total + VAT(T1)

ok in the control source for VAT T1 i entered the following as my formula :
=[sub total] * [Vat]
for my total including vat feild i entered this formula:
=[sub total] + [VAT (T1)]

now in my forms these formulas seem too be working perfectly fine
however wen i go bak to my table ... both VAT (T1) and TOTAL INCLUDING VAT
come up as 0.00 :S:S
maybe i am writing the formula wrong? also for the feild VAT it is a drop
down box so am not sure .. if this changes anything
please could anyone kindly get bak to me as i am indeed struglling
regards Noor
 
K

Klatuu

If you have a formula or expression in the control source of a form control,
it cannot be bound to a field in the form's record source. The control
source can't be used for both at the same time.

These values should not be stored in your table, anyway. They are
calculated values. Calculated values should never be stored in tables. They
should only be calculated when you want to present them to the user or if
they are part of another calculation.
 
N

nawara

oh right i see.. ok soo eventualy i would need to print a report with these
calculated figures wat can i do ?
is thr any possible alternative.. i just basically need these calculated
feilds to be visible sumwer in my data base wether that be the table or
report?
can you help
thanks alot by the way..... its much appreciated :)
regards Noor
If you have a formula or expression in the control source of a form control,
it cannot be bound to a field in the form's record source. The control
source can't be used for both at the same time.

These values should not be stored in your table, anyway. They are
calculated values. Calculated values should never be stored in tables. They
should only be calculated when you want to present them to the user or if
they are part of another calculation.
hey i am having difficulties
basically i have 4 frilds named:
[quoted text clipped - 19 lines]
please could anyone kindly get bak to me as i am indeed struglling
regards Noor
 
C

Clif McIrvin

Hi Noor:

In a relational database one should not store calculated values in
tables. You can save a query which
"adds" the calculated fields to the other fields in your table, then use
the saved query as your recordsource instead of the table for other
forms, reports etc. which require the calculated values.

For additional background information about relational database design
look at Access MVP Crystal's tutorials, here:

http://www.accessmvp.com/Strive4Peace/Index.htm

scroll down for more:


nawara said:
hey i am having difficulties
basically i have 4 frilds named:
1)sub total-( this is the total not including the vat)
2) VAT-( this is wther the vat is 0.00 or 0.175) 0.175 being the vat
rate we
use in the UK.. for this feild i created a drop down list which
consisters of
:
0.00
0.175
3) VAT (T1)- Vat (t1) is the sum of sub total * VAT
4) Total including VAT- (this is the sum of sub total + VAT(T1)

Fields 3 and 4 should be unbound controls -- ie, NOT fields in your
table (perhaps [sub total] should also be a calculated field).
ok in the control source for VAT T1 i entered the following as my
formula :
=[sub total] * [Vat]
for my total including vat feild i entered this formula:
=[sub total] + [VAT (T1)]

now in my forms these formulas seem too be working perfectly fine
however wen i go bak to my table ... both VAT (T1) and TOTAL INCLUDING
VAT
come up as 0.00 :S:S

I take it VAT is storing correctly in your table?
maybe i am writing the formula wrong? also for the feild VAT it is a
drop
down box so am not sure .. if this changes anything
please could anyone kindly get bak to me as i am indeed struglling
regards Noor

It sounds to me like you are describing a data entry form; and it sounds
like the form is working exactly as it should.

You didn't give us your table name, so I'll call it MyTable.

Using the Simple Query Wizard build a new query from MyTable, Insert All
fields, name it something like MyTableWithCalcs, select the Modify Query
Design checkbox and add your calculated fields. In the query design
grid, the value for "field:" will be:

VAT T1: =[sub total] * [Vat]
TOTAL INCLUDING VAT: =[sub total] + [VAT (T1)]

HTH
 
L

Linq Adams via AccessMonster.com

Going from forum to forum, posting the the identical question, is not going
to get you a different answer! I explained to you why calculations such as
these should never be stored in a table, and Dave has just repeated the
reasons. I gave you a simple step-by-step for storing the results of your VAT
combobox selection in your table. I really don't see how, short of someone
writing your database for you, anyone can help your further.
 
N

nawara

thanks alot for that .. that makes sense .. il chek that site out too.. thank
you for your reply :)

Clif said:
Hi Noor:

In a relational database one should not store calculated values in
tables. You can save a query which
"adds" the calculated fields to the other fields in your table, then use
the saved query as your recordsource instead of the table for other
forms, reports etc. which require the calculated values.

For additional background information about relational database design
look at Access MVP Crystal's tutorials, here:

http://www.accessmvp.com/Strive4Peace/Index.htm

scroll down for more:
hey i am having difficulties
basically i have 4 frilds named:
[quoted text clipped - 8 lines]
3) VAT (T1)- Vat (t1) is the sum of sub total * VAT
4) Total including VAT- (this is the sum of sub total + VAT(T1)

Fields 3 and 4 should be unbound controls -- ie, NOT fields in your
table (perhaps [sub total] should also be a calculated field).
ok in the control source for VAT T1 i entered the following as my
formula :
[quoted text clipped - 6 lines]
VAT
come up as 0.00 :S:S

I take it VAT is storing correctly in your table?
maybe i am writing the formula wrong? also for the feild VAT it is a
drop
down box so am not sure .. if this changes anything
please could anyone kindly get bak to me as i am indeed struglling
regards Noor

It sounds to me like you are describing a data entry form; and it sounds
like the form is working exactly as it should.

You didn't give us your table name, so I'll call it MyTable.

Using the Simple Query Wizard build a new query from MyTable, Insert All
fields, name it something like MyTableWithCalcs, select the Modify Query
Design checkbox and add your calculated fields. In the query design
grid, the value for "field:" will be:

VAT T1: =[sub total] * [Vat]
TOTAL INCLUDING VAT: =[sub total] + [VAT (T1)]

HTH
 
C

Clif McIrvin

nawara said:
thanks alot for that .. that makes sense .. il chek that site out
too.. thank
you for your reply :)

You're welcome.
Clif said:
Hi Noor:

In a relational database one should not store calculated values in
tables. You can save a query which
"adds" the calculated fields to the other fields in your table, then
use
the saved query as your recordsource instead of the table for other
forms, reports etc. which require the calculated values.

For additional background information about relational database design
look at Access MVP Crystal's tutorials, here:

http://www.accessmvp.com/Strive4Peace/Index.htm

scroll down for more:
hey i am having difficulties
basically i have 4 frilds named:
[quoted text clipped - 8 lines]
3) VAT (T1)- Vat (t1) is the sum of sub total * VAT
4) Total including VAT- (this is the sum of sub total + VAT(T1)

Fields 3 and 4 should be unbound controls -- ie, NOT fields in your
table (perhaps [sub total] should also be a calculated field).
ok in the control source for VAT T1 i entered the following as my
formula :
[quoted text clipped - 6 lines]
VAT
come up as 0.00 :S:S

I take it VAT is storing correctly in your table?
maybe i am writing the formula wrong? also for the feild VAT it is a
drop
down box so am not sure .. if this changes anything
please could anyone kindly get bak to me as i am indeed struglling
regards Noor

It sounds to me like you are describing a data entry form; and it
sounds
like the form is working exactly as it should.

You didn't give us your table name, so I'll call it MyTable.

Using the Simple Query Wizard build a new query from MyTable, Insert
All
fields, name it something like MyTableWithCalcs, select the Modify
Query
Design checkbox and add your calculated fields. In the query design
grid, the value for "field:" will be:

VAT T1: =[sub total] * [Vat]
TOTAL INCLUDING VAT: =[sub total] + [VAT (T1)]

HTH
 
K

Klatuu

You would use controls on your report, just like you would on a form, to show
the calculated values.
If you have to export the data in Excel format, you would use calculated
controls in your query to show the values.
--
Dave Hargis, Microsoft Access MVP


nawara said:
oh right i see.. ok soo eventualy i would need to print a report with these
calculated figures wat can i do ?
is thr any possible alternative.. i just basically need these calculated
feilds to be visible sumwer in my data base wether that be the table or
report?
can you help
thanks alot by the way..... its much appreciated :)
regards Noor
If you have a formula or expression in the control source of a form control,
it cannot be bound to a field in the form's record source. The control
source can't be used for both at the same time.

These values should not be stored in your table, anyway. They are
calculated values. Calculated values should never be stored in tables. They
should only be calculated when you want to present them to the user or if
they are part of another calculation.
hey i am having difficulties
basically i have 4 frilds named:
[quoted text clipped - 19 lines]
please could anyone kindly get bak to me as i am indeed struglling
regards Noor
 
L

Linq Adams via AccessMonster.com

Nobody's being "bloody rude!" It's just that your question has already been
answered and you're wasting people's time by asking it over and overagain,
getting the same answers. Everybody here and on other forums are volunteers.
We do this gladly, because we want to help people, especially people starting
out, but we hate to waste our time repeating the same things that others have
already told you.
 
N

nawara via AccessMonster.com

as i sed before... if uv got any issues than move along
and yes u are being rude... blantantly rude!
 
N

nawara via AccessMonster.com

iv finally cracked it thanks to you!! uv been such a good help
one more question and il stop buggin u
i need to change the decimal places... how do i do that in queiries?
thank again Noor :):)

Clif said:
thanks alot for that .. that makes sense .. il chek that site out
too.. thank
you for your reply :)

You're welcome.
Hi Noor:
[quoted text clipped - 52 lines]

HTH
 
C

Clif McIrvin

nawara via AccessMonster.com said:
iv finally cracked it thanks to you!! uv been such a good help
one more question and il stop buggin u
i need to change the decimal places... how do i do that in queiries?
thank again Noor :):)

In the query design grid where you define your calculated values open
the field properties sheet and set the format.

From the menu, select View | Properties.
--
Clif
Still learning Access 2003


Clif said:
thanks alot for that .. that makes sense .. il chek that site out
too.. thank
you for your reply :)

You're welcome.
[quoted text clipped - 52 lines]
 
C

Clif McIrvin

nawara via AccessMonster.com said:
as i sed before... if uv got any issues than move along
and yes u are being rude... blantantly rude!

Sorry, Noor --- I agree with Linq on this one.
 
N

nawara via AccessMonster.com

thank you for helping me
iv got what i need anyway
if it was soo iritating then i guess the both of u shudnt have replied
anyway thanks
Reagrds

Clif said:
iv finally cracked it thanks to you!! uv been such a good help
one more question and il stop buggin u
i need to change the decimal places... how do i do that in queiries?
thank again Noor :):)

In the query design grid where you define your calculated values open
the field properties sheet and set the format.

From the menu, select View | Properties.
thanks alot for that .. that makes sense .. il chek that site out
too.. thank [quoted text clipped - 7 lines]

HTH
 
C

Clif McIrvin

nawara via AccessMonster.com said:
thank you for helping me

You're welcome.
iv got what i need anyway

That's good.
if it was soo iritating then i guess the both of u shudnt have replied
anyway thanks
Reagrds

We are here because we learn from each other, and because we are glad to
help others.

By all means, continue to visit these newsgroups -- you can learn much
simply by 'lurking' here -- browsing around, following threads which are
of interest to you, and searching the archives for answers to questions
that you have.

Here's a good place to get acquainted with these newsgroups:
http://www.mvps.org/access/netiquette.htm

-- and a link to some Access MVP websites:
http://www.accessmvp.com/Links.htm
--
Clif
Still learning Access 2003



Clif said:
iv finally cracked it thanks to you!! uv been such a good help
one more question and il stop buggin u
i need to change the decimal places... how do i do that in queiries?
thank again Noor :):)

In the query design grid where you define your calculated values open
the field properties sheet and set the format.

From the menu, select View | Properties.
thanks alot for that .. that makes sense .. il chek that site out
too.. thank
[quoted text clipped - 7 lines]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top