I would remove part of the join that is constant and put it in a where clause.
--- In MS_Access_Professionals@yahoogroups.com, "Pamela Zimmerman" <pzimmer@...> wrote:
>
> Hello folks,
>
>
>
> I have a function that accepts a date/time value and a string value and uses
> the values in a sql string (excerpt below). An error is thrown at the
> 'ssql = ' line that says '3296 Join Expression Not Supported'. The join is
> a compound key field which is composed of a date/time stamp field
> (sTimeStamp) and a text field (plannerID). The join works ok in the query
> grid, but I can't seem to get it right in the code.
>
>
>
> I've been working on this for too long and would appreciate suggestions.
> Thanks!
>
>
>
> Public Function SiteRemStr(sTimeStamp As Date, pID As String) As String
>
>
>
> Dim ssql As String
>
>
>
> ssql = "SELECT SiteDetail.siteTimeStamp, SiteDetail.plannerID,
> SiteRem.siteRemDesc " _
>
> & "FROM (qryWorkOrderStart " _
>
> & "INNER JOIN SiteDetail " _
>
> & "ON (qryWorkOrderStart.siteTimeStamp = #" & sTimeStamp & "#) " _
>
> & "AND (qryWorkOrderStart.plannerID = '" & pID & "')) " _
>
> & "INNER JOIN SiteRem " _
>
> & "ON SiteDetail.siteRemID = SiteRem.siteRemID;"
>
>
>
>
>
>
>
> [Non-text portions of this message have been removed]
>
Selasa, 28 Februari 2012
[MS_AccessPros] Re: sql problem
__._,_.___
.
__,_._,___
Langganan:
Posting Komentar (Atom)
Tidak ada komentar:
Posting Komentar