Thread: QUERY FIELD SUM
View Single Post
  #15  
Old May 6th, 2010, 03:05 AM posted to microsoft.public.access.queries
John W. Vinson
external usenet poster
 
Posts: 18,261
Default QUERY FIELD SUM

On Wed, 5 May 2010 11:17:01 -0700, gambler
wrote:

I understand why you cant accept me as a client. There are only so many hours
in a day. As one gets older he tries to enjoy more of them.


I'm 64 myself so I know just what you mean... that's one reason I'm declining
the proposal!

I just appreciate
what time you give. Ill do my best when i try and explain what im doing.
Please dont get to flustrated with me as im not that good with access. Most
of my success is trial and error. Many times i dont know what ive done, but
it works.
I have a 6 tables like you described above. I joint whatever tables im going
to use in a query by connecting lines between the following fields. [ track,
date, race , program] This allows the table data to be applied to each horse.
I then make up a report to read this data.
In the query im writing now, Im giving 20-30 data fields a 1 or 2.


What is this table? What are these fields?

I hope to
apply the 1 or 2 to the data by using IIF statements. My data starts out with
trk, date, race, program #, horse name and the 20-30 fields of IFF
statements.


That's where I think you're going wrong. If you have 20 or 30 different
values, all of which pertain to a given (track, date, race, program, horse)
then you should have - I think, not knowing what the data is!!! - 20 or 30
RECORDS (not fields), in a table with fields for the identifying information
(track, date, race, program, horse), a field to identify the kind of value
(perhaps what you're now using as your fieldname), and the value. You could
then do a totals query *summing down the list* rather than across. That's how
relational tables work best.

These will go from left to right across my sheet. At the end of
my last field i hope to be able to sum all the 20-30 fields.


Don't confuse data PRESENTATION with data STORAGE. You may visualize the
values going across, or even present them that way (say with a crosstab
query), but based on my (incomplete!) understanding of what you're trying to
do, you should not store them that way.

This last field
i will put in my report. Have i made myself clear? If not ill try again.
Sure appreciate help
ed


If you could clarify what these fields mean it might help come up with a more
properly normalized solution.
--

John W. Vinson [MVP]