解决方法如下(harsonliao):
在窗体上放一文本框用来输入时间,另放两个按钮,一个开始,一个结束
当在文本框中输入时间后单击开始按钮则开始播放。单击停止则停止
以下是代码
Private Sub FORM_Load()
Me.TimerInterval = 0
End Sub
Private Sub FORM_Timer()
On Error GoTo Exit_Err
DoCmd.GoToRecord , , acNext
Exit Sub
Exit_Err:
Me.TimerInterval = 0
MsgBox "已到记录尾"
End Sub
Private Sub 命令12_Click()
If IsNull(Me.txtTime) or Me.txtTime < 1000 Then
Me.TimerInterval = 1000
Else
Me.TimerInterval = Me.txtTime
End If
End Sub
Private Sub 命令13_Click()
Me.TimerInterval = 0
End Sub
3COME考试频道为您精心整理,希望对您有所帮助,更多信息在http://www.reader8.com/exam/