Re: SQL help
From: Gerald Stanley (gcstanley_at_d-s-l.pipex.comREMOVE-)
Date: 08/30/04
- Previous message: Douglas J. Steele: "Re: Get time from DATE/time field?"
- In reply to: Michael S. Montoya: "Re: SQL help"
- Next in thread: Michael S. Montoya: "Re: SQL help"
- Reply: Michael S. Montoya: "Re: SQL help"
- Messages sorted by: [ date ] [ thread ]
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)
>> >
>> >.
>> >
>>
>.
>
- Previous message: Douglas J. Steele: "Re: Get time from DATE/time field?"
- In reply to: Michael S. Montoya: "Re: SQL help"
- Next in thread: Michael S. Montoya: "Re: SQL help"
- Reply: Michael S. Montoya: "Re: SQL help"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|