求解答,运行时出现“对象打开时,不允许操作”
我想从数据库的三个表中取出数据“价格”进行金额的计算,所选择的的编号是三个表中的某一个Private Sub Command3_Click()
Dim t4 As Long
Dim t40 As Long
t4 = Val(Text4.Text)
Call LinkData
rs.Open "select 价格 from 微型车床信息 where 编号='" & Trim(Combo2.Text) & "'", conn, 1, 1
If rs.RecordCount = 0 Then
rs.Open "select 价格 from 微型钻铣床信息 where 编号='" & Trim(Combo2.Text) & "'", conn, 1, 1
Else
rs.Open "select 价格 from 微型台钻信息 where 编号='" & Trim(Combo2.Text) & "'", conn, 1, 1(错误指向此行)“对象打开时,不允许操作”
End If
t40 = rs.Fields("价格")
sum = t4 * t40
Text5.Text = sum
End Sub