
Originally Posted by
Welshgasman
Very nice moke123.
I cannot get a messagebox up on classbar 3 though?
I can go to the last record and if I press next, nothing.
It does work on NavBar4 though?
Edit: In fact neither xPrev or XNext do anything for me? In debug, I put a breakpoint on the next sub in the class and I never get there?

Nothing wrong with Class code itself, just an invocation error on the form. The red original was clsNB3.
Code:
Option Compare DatabaseOption Explicit
Dim clsNB As clsFormNavBar
Dim clsNB2 As clsFormNavBar
Dim clsNB3 As clsFormNavBar
Dim clsNB4 As clsFormNavBar
Private Sub Form_Load()
Set clsNB = New clsFormNavBar
clsNB.InitCls Me, Me.cmdPrev, Me.cmdNext, Me.cmdFirst, Me.cmdLast, Me.cmdNew, Me.LblCount, Disable
Set clsNB2 = New clsFormNavBar
clsNB2.InitCls Me, Me.btPrev, Me.btNext, Me.btFirst, Me.btLast, , Me.LblCount, Cycle
Set clsNB3 = New clsFormNavBar
clsNB3.InitCls Me, Me.xPrev, Me.xNext, Me.xFirst, Me.xLast, , Me.LblCount, MessageBx
Set clsNB4 = New clsFormNavBar
clsNB4.InitCls Me, Me.btoP, Me.btoN, , , , Me.LblCount, MessageBx
End Sub