Hi, all
I use that code http://allenbrowne.com/ser-62.html to filter my subform. It works great, but I want to make some additions:
1 - On Property Sheet I want to set "Navigation Buttons" to "No", because I want them hidden;
2 - I make custom buttons with text box to display the records with that code:
So, when the "Navigation Buttons" is set to "No" and filter with combobox the subform displays only 1 record, not all filtered records.
What should I do to show all filtered records in the subform?. Is it possible to do that with custom buttons and text box to display records?
I use that code http://allenbrowne.com/ser-62.html to filter my subform. It works great, but I want to make some additions:
1 - On Property Sheet I want to set "Navigation Buttons" to "No", because I want them hidden;
2 - I make custom buttons with text box to display the records with that code:
Code:
Private Sub Form_Current()
Me!txtResult = CurrentRecord & " to" & Me.RecordsetClone.RecordCount
Me.Caption = Me.txtResult
On Error Resume Next
' These If Statements manage the Navigation Buttons
If Me.CurrentRecord = 1 Then
Me.cmd_Back.Enabled = False
Me.cmd_First.Enabled = False
Else
Me.cmd_Back.Enabled = True
Me.cmd_First.Enabled = True
End If
If Me.CurrentRecord = Me.Recordset.RecordCount Then
Me.cmd_Last.Enabled = False
Else
Me.cmd_Last.Enabled = True
End If
If Me.CurrentRecord >= Me.Recordset.RecordCount Then
Me.cmd_Next.Enabled = False
Else
Me.cmd_Next.Enabled = True
End If
End Sub
What should I do to show all filtered records in the subform?. Is it possible to do that with custom buttons and text box to display records?