Re: SQL help

From: Gerald Stanley (gcstanley_at_d-s-l.pipex.comREMOVE-)
Date: 08/30/04

  • Next message: SELECT QUERY HELP: "SELECT QUERY"
    Date: Mon, 30 Aug 2004 13:20:54 -0700
    
    

    I am guessing that the field would still be updateable but
    the scenario that you would need to consider is what do you
    want to happen when a second employee makes a comment on a
    projection that another employee has already commented
    upon. I would anticipate that this methodology would
    result in the first employees comment being overwritten.

    Hope This Helps
    Gerald Stanley MCSD
    >-----Original Message-----
    >Currently, the way the SQL is working, to be honest I
    don't understand how,
    >if the user adds a comment where the CommentID is null, a
    new record is
    >created in the comment table. Seeing that this was
    happening, I was able to
    >use code to assign their employeeID when the record was added.
    >
    >Using the Iif statement, would that make the field not
    updateable? If so, I
    >can't use this method...
    >
    >"Gerald Stanley" wrote:
    >
    >> Instead of using a WHERE clause to filter the comments, you
    >> need to use a IIf statement in the SELECT clause.
    >> Soemthing along the lines of
    >>
    >> IIf(employeeId = cboFilter, colComment, "")
    >>
    >> should do the trick.
    >>
    >> Hope This Helps
    >> Gerald Stanley MCSD
    >> >-----Original Message-----
    >> >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)
    >> >
    >> >.
    >> >
    >>
    >.
    >


  • Next message: SELECT QUERY HELP: "SELECT QUERY"

    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)
    • SQL help
      ... show all items in the projection whether notes exist for cboFilter or not. ... tblProjections and left joining tblComments on ProjectionID. ... EmployeeID = cbofilter or EmployeeID is null. ...
      (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)