在我的access窗体中,有一个text1文本框,里面我录入数字10:05,表示10分零5秒。
我在旁加一按钮,想按一下这按钮,text1中的数字就加5分钟,变为15:05
我用了两个按钮代码,都不对:
方法1:
Private Sub Command33_Click()
Dim wert As String
wert = [Text1]
Text1 = wert + Format([05:00], "hh:mm")
End Sub
方法2:
Private Sub Command33_Click()
Dim wert As String
wert = [Text1]
Text1 = Format(wert, "hh:mm") + Format([05:00], "hh:mm")
End Sub
...全文
661打赏收藏
时间 按一下按钮,加5分钟
在我的access窗体中,有一个text1文本框,里面我录入数字10:05,表示10分零5秒。 我在旁加一按钮,想按一下这按钮,text1中的数字就加5分钟,变为15:05 我用了两个按钮代码,都不对: 方法1: Private Sub Command33_Click() Dim wert As String wert = [Text1] Text1 = wert + Format([05:00], "hh:mm") End Sub 方法2: Private Sub Command33_Clic
Private Sub Command2_Click()
Dim dTemp As Date
dTemp = CDate("00:" & Me.Text0.Value)
dTemp = DateAdd("s", 5, dTemp)
Me.Text0.Value = Format(dTemp, "nn:ss")
End Sub