Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Calculations Part C

0 views
Skip to first unread message

Calypso

unread,
Mar 3, 2007, 11:32:00 PM3/3/07
to
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], [u], [y], [ac] and [ag] until [ak]
is 0. However, if [d] is equal to "n" apply amounts of 60 in [m], [q], [u],
[y], [ac] and [ag] until [ak] is 0.

Can I do this, if so how?
--
Tara
MS Access Programer-in-Training

John Nurick

unread,
Mar 4, 2007, 3:21:48 AM3/4/07
to
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], [u] ... [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], [u] ... [ag] with a single field in a related table.


On Sat, 3 Mar 2007 20:32:00 -0800, Calypso <paw...@hotmail.com> wrote:

>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], [u], [y], [ac] and [ag] until [ak]
>is 0. However, if [d] is equal to "n" apply amounts of 60 in [m], [q], [u],
>[y], [ac] and [ag] until [ak] is 0.
>
>Can I do this, if so how?

--
John Nurick [Microsoft Access MVP]

Please respond in the newsgroup and not by email.

Tom Wickerath

unread,
Mar 4, 2007, 3:58:20 AM3/4/07
to
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
__________________________________________

0 new messages