Sub clear()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = Now()
End Sub
Private Sub Command1_Click()
' If Text1.Text = "" Or Text2.Text = "" Or Text3.Text = "" Or Text4.Text = "" Or Text5.Text = "" Or Text6.Text = "" Then
' MsgBox "请填写完整信息"
'Text1.SetFocus
'Text1.Text = ""
'Text2.Text = ""
'Text3.Text = ""
'Text4.Text = ""
'Text5.Text = ""
'Text6.Text = Now()
'Else
Call clear
Adodc1.Recordset.AddNew
'
'Text6.Text = Now()
Command1.Enabled = False
Command2.Enabled = True
'End If
End SubPrivate Sub Command2_Click()
If Text1.Text = "" Or Text2.Text = "" Or Text3.Text = "" Or Text4.Text = "" Or Text5.Text = "" Or Text6.Text = "" Then
MsgBox "请填写完整信息"
Text1.SetFocus
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = Now()
Else
Adodc1.Recordset.Update
Text1.SetFocus
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = Now()
Command1.Enabled = True
Command2.Enabled = False
End If
'MsgBox "保存成功,请添加下一条记录", "提示"
End SubPrivate Sub Command3_Click()
'Text1.SetFocus
' Text1.Text = ""
'Text2.Text = ""
'Text3.Text = ""
'Text4.Text = ""
'Text5.Text = ""
'Text6.Text = Now()
End SubPrivate Sub Form_Load()
Command1.Enabled = True
Command2.Enabled = False
End Sub
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = Now()
End Sub
Private Sub Command1_Click()
' If Text1.Text = "" Or Text2.Text = "" Or Text3.Text = "" Or Text4.Text = "" Or Text5.Text = "" Or Text6.Text = "" Then
' MsgBox "请填写完整信息"
'Text1.SetFocus
'Text1.Text = ""
'Text2.Text = ""
'Text3.Text = ""
'Text4.Text = ""
'Text5.Text = ""
'Text6.Text = Now()
'Else
Call clear
Adodc1.Recordset.AddNew
'
'Text6.Text = Now()
Command1.Enabled = False
Command2.Enabled = True
'End If
End SubPrivate Sub Command2_Click()
If Text1.Text = "" Or Text2.Text = "" Or Text3.Text = "" Or Text4.Text = "" Or Text5.Text = "" Or Text6.Text = "" Then
MsgBox "请填写完整信息"
Text1.SetFocus
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = Now()
Else
Adodc1.Recordset.Update
Text1.SetFocus
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = Now()
Command1.Enabled = True
Command2.Enabled = False
End If
'MsgBox "保存成功,请添加下一条记录", "提示"
End SubPrivate Sub Command3_Click()
'Text1.SetFocus
' Text1.Text = ""
'Text2.Text = ""
'Text3.Text = ""
'Text4.Text = ""
'Text5.Text = ""
'Text6.Text = Now()
End SubPrivate Sub Form_Load()
Command1.Enabled = True
Command2.Enabled = False
End Sub
Adodc1.Recordset.AddNew
Adodc1.Refresh
Text1.SetFocus
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = Now()
Command1.Enabled = True
Command2.Enabled = False
End Sub
加入后为何还出错???????????
刚开始时加载!!!!!!!!
请高手指教!!!!!11
if rs.state=1 then
rs.close
end if