- 17
- 0
- 约小于1千字
- 约 3页
- 2016-12-01 发布于重庆
- 举报
office0710access数据库窗体启用鼠标滚轮翻页教程
office2007\2010中access数据库窗体启用鼠标滚轮翻页教程1、在设计视图中打开窗体
2、使用 Alt + F11 键组合,或在功能区上,以打开 Microsoft Visual Basic 编辑器窗口的工具组中单击查看代码。
VB代码下页
3、将以下代码粘贴到代码窗口。
Private Sub Form_MouseWheel(ByVal Page As Boolean, ByVal Count As Long)
If Not Me.Dirty Then
If (Count 0) And (Me.CurrentRecord 1) Then
DoCmd.GoToRecord , , acPrevious
ElseIf (Count 0) And (Me.CurrentRecord = Me.Recordset.RecordCount) Then
DoCmd.GoToRecord , , acNext
End If
Else
MsgBox The record has changed. Save the current record before moving to another record.
End If
End Sub
4、保存,然后在窗体视图中打开窗体。
原创力文档

文档评论(0)