SQL语法错误,VB access 数据库 中提示 from 子句语法错误,代码如下,请高手指点 在线等。
PrivateSubCombo5_Click()Setconn=CreateObject("adodb.connection")Setrs=CreateObject("a...
Private Sub Combo5_Click()
Set conn = CreateObject("adodb.connection")
Set rs = CreateObject("adodb.recordset")
conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;Data Source=" & App.Path & "\NXRYINF.mdb"
rs.Open "select * from shixianbh, station where shixianbh.市县ID=station.市县ID and shixianbh.市县='" & Combo5.Text & "'", conn, , , adCmdTable
Do While Not rs.EOF
Combo6.AddItem rs("作业点简称")
rs.MoveNext
Loop
rs.Close
Set rs = Nothing
Set conn = Nothing
End Sub 展开
Set conn = CreateObject("adodb.connection")
Set rs = CreateObject("adodb.recordset")
conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;Data Source=" & App.Path & "\NXRYINF.mdb"
rs.Open "select * from shixianbh, station where shixianbh.市县ID=station.市县ID and shixianbh.市县='" & Combo5.Text & "'", conn, , , adCmdTable
Do While Not rs.EOF
Combo6.AddItem rs("作业点简称")
rs.MoveNext
Loop
rs.Close
Set rs = Nothing
Set conn = Nothing
End Sub 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询