为什么保存控件什么文本都没输入也能保存成空白表~求解
Private Sub StylerButton1_Click(Index As Integer)Dim cn As New ADODB.Connection
cn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\db1.mdb"
cn.Execute "insert into 车辆档案表(档案编号) values ('" & Label5.Caption & "')"
cn.Close
If Text1 = "" Then
MsgBox "姓名不能为空", 4, "农机档案管理平台"
Text1.SetFocus
Exit Sub
End If
If Combo1.Text = "" Then
MsgBox "档案类型不能为空", 4, "农机档案管理平台"
Combo1.SetFocus
Exit Sub
End If
If Text4 = "" Then
MsgBox "档案编号不能为空", 4, "农机档案管理平台"
Text4.SetFocus
Exit Sub
End If
MsgBox "保存完毕!"
MSHFlexGrid1.Refresh
Set MSHFlexGrid1.DataSource = rs
rs.Refresh
End Sub