Re: Summing totals if record satisfy criteria

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Here is what I have at the moment:

I have a form with 8 slots for the project name and 8 slots for the Hours
corresponding to each project slot. From these project slots, the user can
select any of the projects (from a drop-down list which uses another table
listing all of the possible projects). My form writes into the final table
for which I have at the moment, a field for every project slot and a field
for all the corresponding project hours.

What do have to need to change? Should I only have one project field and one
hours field named "Projects" and "Hours" in my final table respectively and
somehow connect it to another table? And how would I get the hours to
correspond with a certain project chosen?

Thus, the user will have the option to choose a certain project for each
slot as well as the amount of hours on that project (on the form). At the
end, I would like to generate a report and sees how many hours was spent on
which project, irrelevant on which slots the selected which projects
(Sometimes a cetain project will be selected on the first slot, sometimes on
the second slot or sometimes on slot 1 and 3). What is important, is to know
how many hours was spent on a certain project. The hours must correspond with
the spesific project and I would like to sum these hours for each project at
the end or something similar.

Thanks!


"Duane Hookom" wrote:

> It sounds like you need to normalize your table structure. However, we don't
> know what your structure is or how to help you unless you provide us with
> some sample data (with field names) and the desired sums.
>
> --
> Duane Hookom
> MS Access MVP
>
>
> "Rudi" <Rudi@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> news:AD232C6D-B500-4497-B221-A749ABA00EDD@xxxxxxxxxxxxxxxx
> > Hi,
> >
> > I have a query that displays certain information based on a form. I now
> > want
> > to sum totals for certain information from the query. There is a few slot
> > for
> > projects. There is also about 10 projects to choose from. For each project
> > slot, there is a corresponding Hour slot. I can for instance select the
> > Blue
> > project in slot 1 and in slot 2 and the red project in slot 3 (this would
> > be
> > one record). At the next record I can choose Red project at slot 1, Blue
> > project at slot 2 and Green project at slot 3. At the end I want to add up
> > all the amount of hours for each project (never mind the slot that I have
> > chosen). Like, display blue project, 5 hours, green project 6 hours, Red
> > project 2 hours. What I basically need to do, is to count the amount of
> > hours
> > in a slot, based on certain criteria.
> >
> > How can I do this?
>
>
>
.



Relevant Pages

  • Re: 1-year sum question
    ... I would like to add a column to this query that is the total of the amount column from day 1 to day 365 (the same amount as in the running sum column for day 365). ...
    (microsoft.public.access.queries)
  • Re: Calculated field, sum/avg results of qry?
    ... Perhaps you could show us your SQL that "doesn't work", ... "Duane Hookom" wrote: ... fields and then sum and average all the values in the other fields. ... other fields in the resulting query, then display that ...
    (microsoft.public.access.queries)
  • Re: drawing from 2 different tables with a certain criteria---for
    ... the fields we have to sum. ... Amount FROM firstTable WHERE dateTime BETWEEN this AND that ... If you open such a query, ... > I am trying to sum the amount fields from both tables, ...
    (microsoft.public.access.queries)
  • Re: 1-year sum question
    ... I am getting an error message before the query runs. ... I would like to add a column to this query that is the total of the amount column from day 1 to day 365 (the same amount as in the running sum column for day 365). ...
    (microsoft.public.access.queries)
  • Re: Summing a column
    ... Since the query refers to myTable twice, it's necessary to be able to keep ... amount and a bonus amount that are added together for each sale. ... to calculate the sum of all of these for the total check amount. ... What do I need to do to sum the TotalPaidPerSale column? ...
    (microsoft.public.access.queries)