我是新手请来帮个忙?
我在VB中的代码什么地方错了啊,应该怎么该,才能选择性的输入text2.text啊
If cnn.State <> 0 Then
cnn.Close
End If
Dim strSql As String
cnn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=E:\sem1\温建峰\温建峰\equipment\equipment.mdb;Persist Security Info=False"
cnn.Open
strSql = " insert into equipment values(" _
& "'" & Text1.Text & "'," _
& "'" & Text2.Text & "'," _
& "'" & Text3.Text & "'," _
& "'" & Text4.Text & "')"
cnn.Execute strSql
If MsgBox("已保存是否继续", vbQuestion + vbYesNo, "消息") = vbYes Then
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
End If