可以这么设定代码:在设计视图下,右键点击“当前日期”--“事件”--“单击”--“生成代码”Private Sub Command1_Click() Me.Text1.Value = Date '文本框名 text1End Sub Private Sub Command2_Click()Me.Text2.Value = Time ' '文本框名 text2End Sub