SQL语句的问题!为什么执行后提示错误!
SELECT getOrgRefNo([RefNo]) AS FC_RefNo, FinalConfirm.PONO, FinalConfirm.Rev, FinalConfirm.B_QTY, FinalConfirm.DelDate, FinalConfirm.FOBDateFROM FConf_Detail INNER JOIN FinalConfirm ON (FConf_Detail.PONO = FinalConfirm.PONO) AND (FConf_Detail.Rev = FinalConfirm.Rev)
WHERE (((getOrgRefNo([RefNo]))<>getOrgRefNo([forms]![F_FConf]![cboRefNo])));
getOrgRefNo是一个方法:
Function getOrgRefNo(str As String) As String
Dim i As Integer
i = InStr(1, str, "-")
If i > 0 Then
getOrgRefNo = Left(str, i - 1)
Else
getOrgRefNo = str
End If
End Function
但是执行后总是提示错误:
特定字段'[RefNo]'可以参考SQL语句From字句列表中的多个表!
请教如何解决这个问题!!!