如何自動“播放”數(shù)據(jù)庫記錄?
發(fā)布時間:2008-08-14 閱讀數(shù): 次 來源:網(wǎng)樂原科技
解決方法如下:
在窗體上放一文本框用來輸入時間,另放兩個按鈕,一個開始,一個結(jié)束
當在文本框中輸入時間后單擊開始按鈕則開始播放。單擊停止則停止
以下是代碼
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