Hi all
I have a text box I want to show the current record number and total records so it reads "1 of 10" etc, I have got it to work on my main form but cant on my sub form another any suggestions?
it seems to recognise the first record as 0, so it reads "0 of 10" when I go to the next record it will go "1 of 10" etc any suggestions why?
Both on main for and sub form code
the text box field control source
many thanks
I have a text box I want to show the current record number and total records so it reads "1 of 10" etc, I have got it to work on my main form but cant on my sub form another any suggestions?
it seems to recognise the first record as 0, so it reads "0 of 10" when I go to the next record it will go "1 of 10" etc any suggestions why?
Both on main for and sub form code
Code:
Public Function udfRecords(f As Form)
' RECORD NUMBERS
With f
udfRecords = .CurrentRecord & " of " & IIf(.NewRecord, .CurrentRecord, .Recordset.RecordCount)
End With
End Function
the text box field control source
Code:
=udfRecords([Form])
many thanks