主题:[讨论]vb from子句语法错误 实时错误‘3131’在网上找了半天也没个答案
Private Sub txtStudent_Change()
strSQL = "select Student.*,Class.ClassName,Department.DepartName,Class.Master from Student,Class,Department"
strSQL = strSQL & "where Student.ClassID=Class.ClassID"
strSQL = strSQL & "and Class.DepartID=Department.DepartID"
strSQL = strSQL & "and StudentID='" & txtStudent.Text & "'"
dataStudent.RecordSource = strSQL
dataChange.RecordSource = "select * from Change where StudentID='" & txtStudent.Text & "'"
dataReward.RecordSource = "select * from Reward where StudentID='" & txtStudent.Text & "'"
dataPunish.RecordSource = "select * from Punish where StudentID='" & txtStudent.Text & "'"
dataStudent.Refresh'调试到这开始弹出错误
dataChange.Refresh
dataReward.Refresh
dataPunish.Refresh
End Sub
高手看看哪的问题啊
strSQL = "select Student.*,Class.ClassName,Department.DepartName,Class.Master from Student,Class,Department"
strSQL = strSQL & "where Student.ClassID=Class.ClassID"
strSQL = strSQL & "and Class.DepartID=Department.DepartID"
strSQL = strSQL & "and StudentID='" & txtStudent.Text & "'"
dataStudent.RecordSource = strSQL
dataChange.RecordSource = "select * from Change where StudentID='" & txtStudent.Text & "'"
dataReward.RecordSource = "select * from Reward where StudentID='" & txtStudent.Text & "'"
dataPunish.RecordSource = "select * from Punish where StudentID='" & txtStudent.Text & "'"
dataStudent.Refresh'调试到这开始弹出错误
dataChange.Refresh
dataReward.Refresh
dataPunish.Refresh
End Sub
高手看看哪的问题啊