I was wondering if I could ask how to hide a next button on a form if the qry driving the form pulls only one record.
Any help would be interesting and helpful.
Thanks for the advice. I tried putting the dcount expression in the OnActivate event of the form that has the navigation button, but it did not show a result. I would imagine I put it in the wrong place. Any further suggestions?
I've got "First", "Next", "Previous", and "Last" record buttons on a form that I disable if they don't apply to the current recordset.
The following is from the "On Current" event of the form.
My buttons are FirstRecord, NextRecord, PreviousRecord, and LastRecord. You should be able to use it for just the NextRecord button if thats all you need.
Private Sub Form_Current()
Dim recClone As Recordset
Set recClone = Me.RecordsetClone()
If recClone.RecordCount = 0 Then
FirstRecord.Enabled = False
NextRecord.Enabled = False
PreviousRecord.Enabled = False
LastRecord.Enabled = False
Else
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.