Selasa, 28 Februari 2012

[MS_AccessPros] sql problem

 

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]

__._,_.___
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar