0

我再有一个错误,它说:“查询表达式中的语法错误(缺少运算符)。

这是我的代码:

"SELECT AttHadir.IDUser, Hadir.NamaUser, AttHadir.JamMasuk, AttHadir.Threshold," & _
"AttHadir.ModVerifikasi, AttHadir.ModVerifikasi FROM AttHadir INNER JOIN Hadir ON AttHadir.IDUser = Hadir.IDUser" & _
"WHERE AttHadir.IDUser='" & TBox(0).Text & "' AND MONTH(AttHadir.JamMasuk) AS Bulan ='" & Combo(0).Text & "'" & _
"AND YEAR(AttHadir.JamMasuk) AS Tahun='" & Combo(1).Text & "'"

每个人都知道我的正确代码吗?谢谢

4

1 回答 1

0

您的字符串将被创建为:

SELECT AttHadir.IDUser, Hadir.NamaUser, AttHadir.JamMasuk, AttHadir.Threshold,AttHadir.ModVerifikasi, AttHadir.ModVerifikasi FROM AttHadir INNER JOIN Hadir ON AttHadir.IDUser = Hadir.IDUserWHERE AttHadir.IDUser='' AND MONTH(AttHadir.JamMasuk) AS Bulan =''AND YEAR(AttHadir.JamMasuk) AS Tahun=' '

我认为您之前缺少空格AttHadir.ModVerifikasiWHERE AttHadir.IDUser并且AND YEAR(AttHadir.JamMasuk)

于 2013-09-10T03:25:10.717 回答