Re: Summarizing records in one table that match a different table



copy/paste the query's SQL statement into a post, and i'll show you where to
make the change. (you can do it from the design grid as well, and it's
actually pretty easy - but i cringe it the thought of trying to explain it
in a post. if i could sit next to you and point... <g>)

to copy the SQL statement, open your query in design view, and on the menu
bar click View | SQL View. in the SQL pane, highlight and copy the entire
SQL statement.

hth


"TomC" <TomC@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:96360D1A-CDBD-43E9-BE05-31B0089C9887@xxxxxxxxxxxxxxxx
> OK Tina. I am afraid that my knowledge of doing what you suggested is
> lacking. My problem - not yours. I created a new query with the
Activities
> table. Then in the query design view I added the Clients table and it
> automatically linked using the Client ID code. Now I'm looking at the
screen
> and do not know how to enter the "From Activities Left Join etc."?? So if
you
> will take me by the hand and lead me through this, as you have done in the
> past, I would greatly appreciate it.
> Thanks, Tom
>
> "tina" wrote:
>
> > create a new query with the Activities table, showing all the fields you
> > need to see about activities. in the query design view, add the Clients
> > table. link the two tables with a LEFT JOIN from the Activites table to
the
> > Clients table, as
> >
> > FROM Activities LEFT JOIN Clients ON Activities.ClientID =
Clients.ClientID
> >
> > this will ensure that you get all Activities records, but only those
Client
> > records where there is a matching Activities record.
> >
> > hth
> >
> >
> > "TomC" <TomC@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> > news:AEA3CF2D-36C3-4F77-9275-54CD66E182E0@xxxxxxxxxxxxxxxx
> > > I have a Clients Table and an Activities Table. There is one entry
for
> > each
> > > client with identification information. The Activities Table contains
an
> > > entry for each date that something happens to a Client. But not all
> > Client
> > > records have an activity and this is what causes my question, because
I
> > don't
> > > know how to have Access just give me a summary (Count(*)) for the
"active"
> > > clients only. The two tables are linked by a Client ID. I've tried
using
> > a
> > > Query that ties both tables together as the report source, but it
counts
> > the
> > > Client record regardless of whether it has a matching Activity record
or
> > not.
> > > So that is my story, and I'd appreciate any clues you could give me so
> > that
> > > it would add only the "matching" Client records.
> > > Thanks, Tom
> > >
> >
> >
> >


.



Relevant Pages

  • Re: control source to switch tables
    ... the combo box so that I can retrieve the record for a specific client for a ... client XYZ in the year 2000. ... modified SQL statement in the OpenArgs argument of the DoCmd.OpenReport and ... If I have a form that has an entry field for the reporting year, ...
    (microsoft.public.access.forms)
  • Re: Slow queries when joining local to SQL Server tables
    ... SQL Statement in Access: ... "david" wrote: ... You could try the "Native Client" driver which is probably installed ... If you haven't done so already, compact the Access database, create ...
    (microsoft.public.access.queries)
  • RE: Combo box sync
    ... What is the RowSource (SQL statement) for cboClient? ... one field in this SQL, what is the bound column, and what is the data type of ... single quote, ... When I select the client, it populates that box correctly, Then, when I ...
    (microsoft.public.access.formscoding)
  • Re: Summarizing records in one table that match a different table
    ... of me figure out where or how this SQL statement could get entered. ... After doing a new query and adding the client table, I have copied the SQL as ... Then in the query design view I added the Clients table and it ...
    (microsoft.public.access.reports)
  • Re: Summarizing records in one table that match a different table
    ... FROM tblClientActivities LEFT JOIN tblClients ON ... SQL statement, and again *after* you change the SQL - you'll see how the ... change is displayed in the design view. ... > After doing a new query and adding the client table, ...
    (microsoft.public.access.reports)