SQL help

From: Michael S. Montoya (Montoya_at_discussions.microsoft.com)
Date: 08/30/04


Date: Mon, 30 Aug 2004 12:05:04 -0700

I have a table of Sales Projections (tblProjections) to which several
employees are to enter their comments regarding the projections
(tblComments). I have a combo box (cboFilter) that allows the form to be
filtered to show a particular employee's notes. However, I would like to
show all items in the projection whether notes exist for cboFilter or not.

Currently, on the form I have am selecting several fields from
tblProjections and left joining tblComments on ProjectionID. On the
cboFilter.AfterUpdate I am merely applying a filter on the form where
EmployeeID = cbofilter or EmployeeID is null.

The problem is this: There are three projection entries. Joe made a
comment on ProjectionID 1, Fred made a comment on ProjectionID 2, and nobody
made a comment on ProjectionID 3. When you select Joe from cboFilter, then
you only see record 1 and 3 (because 3 is null). Record 2 does not show up
because it is not null, however, there is no entry for Joe.

How do I show all three entries, with Joe's comment for ProjectionID 1 and
no comments for the other two records? I need the data on the form to be
editable (at least data in the Comments table, not the Projections table)



Relevant Pages

  • Re: SQL help
    ... Instead of using a WHERE clause to filter the comments, ... I have a combo box (cboFilter) that allows ... >comment on ProjectionID 1, ...
    (microsoft.public.access.queries)
  • Re: SQL help
    ... > cboFilter or not. ... >>cboFilter.AfterUpdate I am merely applying a filter on the ... > ProjectionID 2, and nobody ... >>because it is not null, however, there is no entry for Joe. ...
    (microsoft.public.access.queries)
  • Re: SQL help
    ... projection that another employee has already commented ... >> need to use a IIf statement in the SELECT clause. ... >> cboFilter or not. ... >> ProjectionID 2, and nobody ...
    (microsoft.public.access.queries)