i would like to add a "record counter" on one of my subform labels. i are familiar with the navigation buttons but do not like them and would like to simply tally the number of records available. is there a way to do this?
I'm simply wondering when does the recordset get created. Is it after the form opens? I think the Form_Current event fires as soon
as the form opens. If the code to create the recordset has not yet run, it would seem an error would be generated. Perhaps if you
place the code to also run after the recordset has been promulgated?
If this is true "simply tally the number of records available" then why not just add a text box:
[tt][blue]
Control Source: =Count(*)[/blue][/tt]
You may need to requery the text box in the after update event of the subform.
wouldn't this give me a total of every record for every client? i am trying to get the total number of records on a per client basis. my table contains all client records, but i use a list box to select and view a specific client.
Private Sub Form_Current()
If Not Me.RecordsetClone.EOF Then
Me.RecordsetClone.MoveLast
End If
DIRECT_CONNECT_Label.Caption = Me.RecordsetClone.RecordCount
End Sub
Received the following error:
run-time error: object required
with DIRECT_CONNECT_Label.Caption = Me.RecordsetClone.RecordCount highlighted
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.