vb 实时错误 至少一个参数没有被指定值
DimaaAsStringPrivateSubCombo1_Click()aa=Trim(Combo1.Text)EndSubPrivateSubCommand1_Cli...
Dim aa As String
Private Sub Combo1_Click()
aa = Trim(Combo1.Text)
End Sub
Private Sub Command1_Click()
Dim i As Integer
Dim cn As ADODB.Connection
Dim rs As Recordset
Dim sql, sql1 As String
Set cn = New ADODB.Connection
cn.CursorLocation = adUseClient
cn.Open "provider=Microsoft.jet.OLEDB.4.0;data source=" & App.Path & "\数据库.mdb"
sql1 = "select * from 机房软件 where 机房名称=aa"
Debug.Print
Set rs = cn.Execute(sql1)
aa已经被赋值机房1了,不知道有什么格式错误 展开
Private Sub Combo1_Click()
aa = Trim(Combo1.Text)
End Sub
Private Sub Command1_Click()
Dim i As Integer
Dim cn As ADODB.Connection
Dim rs As Recordset
Dim sql, sql1 As String
Set cn = New ADODB.Connection
cn.CursorLocation = adUseClient
cn.Open "provider=Microsoft.jet.OLEDB.4.0;data source=" & App.Path & "\数据库.mdb"
sql1 = "select * from 机房软件 where 机房名称=aa"
Debug.Print
Set rs = cn.Execute(sql1)
aa已经被赋值机房1了,不知道有什么格式错误 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询