How do I recreate the Navigation Buttons in a more visually appealing way? (1 Viewer)

Cark

Registered User.
Local time
Today, 14:14
Joined
Dec 13, 2016
Messages
153
The Record Navigation Buttons in MS Access are pretty recognisable once you have been using the programme for a while. I would like to change their appearance a little bit and add my own spin / add additional features that I think would be useful.

I am aware that the Operating System Theme Settings can also be used to modify this bar at the bottom of Forms, but I think I would like to recreate the same functionality using Buttons and VBA etc for flexibility of changing appearance and operation.

The Navigation Buttons aspect is relatively easy to achieve (and I have done that so far) with https://www.alvechurchdata.co.uk/hints-and-tips/accnavform.html being a commonly used resource for people recreating the Buttons etc.

There are a couple of aspects that I have not found documentation showing how people have recreated them and would love to get input on how people have/would recreate these:

  • The 1 of Total Number of Records feature (e.g you are on Record 4 of 13) to show you where you are in the group of records. This also allows a user to type in a number and jump straight to that record.
  • The "Search" feature which allows a user to begin typing in a field and jump to it.

I would be interested on hearing input on any other record navigation aspects as well.
 

Attachments

  • RecordNavigationButtons.PNG
    RecordNavigationButtons.PNG
    1.3 KB · Views: 99
  • FeaturesExplained.PNG
    FeaturesExplained.PNG
    69.1 KB · Views: 105

isladogs

MVP / VIP
Local time
Today, 22:14
Joined
Jan 14, 2017
Messages
18,253
I find the built in navigation bar controls too small to be convenient
As a result I have controls like this in many of my apps:



I use a label lblPos and place code like this in the Form_Current event:
Code:
N = DCount("*", "YourTable/QueryName")

Me.lblPos.Caption = Me.CurrentRecord & " of " & N

The Search item I use is a combo listing whatever is appropriate for that form

Also it is a good idea to ensure the first/previous buttons are disabled when on record 1 (including when the form is loaded). Similarly for the Next/Last buttons when on the last record.

There is an example app that you can download from the sample databases area which includes all the code I use: JSON Parser

Its a free cutdown version of my commercial app JSON Analyse & Transform for Access

Hope that helps
 

Attachments

  • FormNavigation.PNG
    FormNavigation.PNG
    3.7 KB · Views: 355

Cark

Registered User.
Local time
Today, 14:14
Joined
Dec 13, 2016
Messages
153
Thank you for your contributions.

Guessing neither of you have attempted to recreate the aspect where you can type say for example 12 in the "1 of 42" box so that you can jump to Record 12?

How Access does this particular aspect is very intriguing to me.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 05:14
Joined
May 7, 2009
Messages
19,246
change the "Number of records" to textbox (txtRecord).
on its AfterUpdate event:
Code:
Private Sub txtRecord_AfterUpdate()
    Dim lngRecord As Long
    lngRecord = Val(Me.txtRecord & "")
    If Me.CurrentRecord > 0 And lngRecord > 0 Then
        If Me.RecordsetClone.RecordCount < lngRecord Then
            MsgBox "Can't go to that record"
        Else
            DoCmd.GoToRecord acDataForm, Me.Name, acGoTo, lngRecord
        End If
    End If
End Sub
 

isladogs

MVP / VIP
Local time
Today, 22:14
Joined
Jan 14, 2017
Messages
18,253
I rarely bother with doing that as users will normally search for a specific item rather than a record number.
If there are a lot of records to scroll through then I sometimes add two buttons to go forward/back by e.g. 10 records. Using autorepeat is also helpful on the navigation buttons
However, its easy enough to do what you want using a separate unbound textbox with go to record code in the after update event
 

Cark

Registered User.
Local time
Today, 14:14
Joined
Dec 13, 2016
Messages
153
Thank you all for your inputs. I have definitely used elements from all the above. Even before isladogs posted about the forward/back by 10 records, I was working on adding that feature in and it is something I definitely found useful. Setting the property for the Autorepeat to yes however did not appear to work on my code so I am troubleshooting this.
 

Users who are viewing this thread

Top Bottom