Calculations Part C

G

Guest

In my table I need to enter a deposit amount, and if field [d] is equal to
"y" to apply amounts of 120 into [m], [q], , [y], [ac] and [ag] until [ak]
is 0. However, if [d] is equal to "n" apply amounts of 60 in [m], [q], ,
[y], [ac] and [ag] until [ak] is 0.

Can I do this, if so how?
 
J

John Nurick

Hi Tara,

Working in a relational database such as Access, one would normally

1) Use meaningful field names.

2) Have fewer fields than the 37 implied by [a] to [ak].

3) Not have the repeating groups of fields implied by the pattern [m],
[q], ... [ag].

4) Do calculations like this "on the fly" in a query or report whenever
they're needed, rather than trying to store their results in a table.

So I suspect you're still thinking in spreadsheet terms and that you
have chosen an unnormalised data structure that will sooner or later
cause worse problems than the present one. Probably you need to replace
[m], [q], ... [ag] with a single field in a related table.




In my table I need to enter a deposit amount, and if field [d] is equal to
"y" to apply amounts of 120 into [m], [q], , [y], [ac] and [ag] until [ak]
is 0. However, if [d] is equal to "n" apply amounts of 60 in [m], [q], ,
[y], [ac] and [ag] until [ak] is 0.

Can I do this, if so how?
 
G

Guest

Hi Tara,

To add some to John's answer, I suggest that you visit this link:

http://home.bendbroadband.com/conradsystems/accessjunkie/resources.html#DatabaseDesign101

Don't underestimate the importance of gaining a good understanding of
database design. Brew a good pot of tea or coffee and enjoy reading! Here
is a quote that I like to share, from a paper written by Michael Hernandez,
author of Database Design for Mere Mortals:

http://www.seattleaccess.org/
(See the last download titled "Understanding Normalization"
in the Meeting Downloads page)

<Begin Quote (from page 23 of document)>
"The most important point for you to remember is that you will always
re-introduce data integrity problems when you de-Normalize your structures!
This means that it becomes incumbent upon you or the user to deal with this
issue. Either way, it imposes an unnecessary burden upon the both of you.
De-Normalization is one issue that you'll have to weigh and decide for
yourself whether the perceived benefits are worth the extra effort it will
take to maintain the database properly."
<End Quote>


Tom Wickerath
Microsoft Access MVP

http://www.access.qbuilt.com/html/expert_contributors.html
http://www.access.qbuilt.com/html/search.html
__________________________________________

John Nurick said:
Hi Tara,

Working in a relational database such as Access, one would normally

1) Use meaningful field names.

2) Have fewer fields than the 37 implied by [a] to [ak].

3) Not have the repeating groups of fields implied by the pattern [m],
[q], ... [ag].

4) Do calculations like this "on the fly" in a query or report whenever
they're needed, rather than trying to store their results in a table.

So I suspect you're still thinking in spreadsheet terms and that you
have chosen an unnormalised data structure that will sooner or later
cause worse problems than the present one. Probably you need to replace
[m], [q], ... [ag] with a single field in a related table.




In my table I need to enter a deposit amount, and if field [d] is equal to
"y" to apply amounts of 120 into [m], [q], , [y], [ac] and [ag] until [ak]
is 0. However, if [d] is equal to "n" apply amounts of 60 in [m], [q], ,
[y], [ac] and [ag] until [ak] is 0.

Can I do this, if so how?

 

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