任何人都可以提出建议吗?新的...我最初得到一个“invalid is not null”错误,在我修改后我现在得到语法错误。
'Add notes about employee
strsql = "SELECT [Employee Number], Declination, Leave, Termed, Comments "
strsql = strsql & "FROM tmpMHPP "
strsql = strsql & "WHERE Declination Is Not Null"
strsql = strsql & "or Leave Is Not Null Or Termed Is Not Null Or Comments Is Not Null"
答案 0 :(得分:2)
你错过了一个空间。您需要在Is Not Null和
之间添加一个空格 strsql = strsql & "WHERE Declination Is Not Null "
'^'
strsql = strsql & "or Leave Is Not Null Or Termed Is Not Null Or Comments Is Not Null"
答案 1 :(得分:0)
你错过了
之间的空间... Declination Is Not Null
和
or Leave Is Not Null ...
答案 2 :(得分:0)
此语法有助于避免这些错误
strsql = "SELECT [Employee Number], Declination, Leave, Termed, Comments" & _
" FROM tmpMHPP" & _
" WHERE Declination Is Not Null" & _
" or Leave Is Not Null Or Termed Is Not Null Or Comments Is Not Null"