把年月日值录入并保存的问题
我在form_load()里面放了显示当时时间的如下代码:Label1.Caption = Now
Text3.Text = Year(Date)
Text4.Text = Month(Date)
Text5.Text = Day(Date)
然后在输入控件里面放下了如下代码:
Private Sub Command7_Click()
If (Rst.State = adStateOpen) Then
Rst.Close
End If
Rst.CursorLocation = adUseClient
Rst.Open "Select * From db01", conn, adOpenKeyset, adLockPessimistic
Rst.AddNew
。。。
。。。
Rst.Fields("n").Value = Text3.Text & ""
Rst.Fields("y").Value = Text4.Text & ""
Rst.Fields("r").Value = Text5.Text & ""
Rst.Update
MsgBox "保存成功!"
执行后,无法保存!
求正解