请问如何对DTPicker付值?
1:程序一打开,DTPicker中总是赌如当前日期,能否不让他读取?
2:如何对他付值?
[解决办法]
在窗体上加一个日期挑选器,然后拷下面代码,
Option Explicit
Private Sub Command1_Click()
dt1.Format = 3
dt1.CustomFormat = " "
dt1.Value = ""
End Sub
Private Sub dt1_Click()
If IsNull(dt1.Value) Then
dt1.Format = 3
dt1.CustomFormat = " "
Else
dt1.Format = 1
End If
End Sub
[解决办法]
Me.DTPicker.SetDate Year(Date), Month(Date), Day(Date)