Access 2007 Query Def语法错误

时间:2015-02-04 17:00:48

标签: sql vba ms-access access-vba

这真是令人沮丧,我希望你能帮助我。无论我在此查询中执行什么操作,我都会收到语法错误。我已经读过关于将parantheses放在多个连接上但是我这样做了并且它不起作用。我在这做错了什么?谢谢你的时间。

Set PTI = CurrentDb.CreateQueryDef("qry_PTImport", "SELECT DISTINCT" & _
            " bl.LoanNumber" & _
            ", qcq.Code" & _
            ", t.ecType" & _
            ", eb.QueryNo" & _
            ", q.QueryName" & _
            ", q.Description" & _
            ", q.suggestedAction" & _
            ", bd.datetransfer" & _
            ", bd.datebrd " & _
            "FROM ((((dbo.eCs_QCqueue qcq " & _
            "JOIN dbo.eCs_Queries q ON q.QueryNo = eb.QueryNo) " & _
            "JOIN brd_loan bl ON bl.serialID = qcq.serialID) " & _
            "JOIN dbo.eCs_Type t ON t.ectypeid = q.ectypeid) " & _
            "JOIN brd_deal bd ON bd.Code = bl.Code) " & _
            "WHERE qcq.Code = '" & Deal & "'")

1 个答案:

答案 0 :(得分:1)

只是想说用户汉斯在这个问题的实例中是正确的。 VBA不只是JOIN s。