Navigation Buttons

T

TonyB

Hi,
I'm trying to create some buttons on a form that duplicate the behaviour of
the navigation buttons at the bottom of a form using VBA. The form is
displaying selected fields from a table, which has a filter applied,
selecting A,B,C ... or all records from the table. I've added the buttons,
and I can step through all or filtered records.
What I can't reproduce is making the currently selected record highlight as
the buttons are clicked.
Also the navigation button toolbar also displays a "filtered" text field
when a filter is applied. I can't see how the navigation button toolbar
knows that a filter has been applied.
Can anyone give me some some clues as to how to do this ?
Thanks
Tony
 
D

DebbieG

This is what I did in a database if records were filtered:

In Form_Current:

If FilterOn = False Then
With Me.RecordsetClone
.MoveLast
.Bookmark = Me.Bookmark
Me.txtRecordCount.Caption = "Record " & Me.CurrentRecord & " of " &
..RecordCount
End With
Else
With Me.RecordsetClone
.MoveLast
.Bookmark = Me.Bookmark
Me.txtRecordCount.Caption = "Record " & Me.CurrentRecord & " of " &
..RecordCount & " (FILTERED)"
End With
End If

HTH,
Debbie

| Hi,
| I'm trying to create some buttons on a form that duplicate the behaviour of
| the navigation buttons at the bottom of a form using VBA. The form is
| displaying selected fields from a table, which has a filter applied,
| selecting A,B,C ... or all records from the table. I've added the buttons,
| and I can step through all or filtered records.
| What I can't reproduce is making the currently selected record highlight as
| the buttons are clicked.
| Also the navigation button toolbar also displays a "filtered" text field
| when a filter is applied. I can't see how the navigation button toolbar
| knows that a filter has been applied.
| Can anyone give me some some clues as to how to do this ?
| Thanks
| Tony
|
|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top