display record 2 of 6 ie

stargate

Registered User.
Local time
Today, 18:43
Joined
Feb 19, 2004
Messages
20
I have two unbound fields on a form that I would like to display the result in the following way, similar to the record navigation at the bottom of a form.


------- of -------

Field names txtOf = ? txttotal = Count(*)


Any help on how to do this would be appreciated.
 
Put this in the OnCurrent Event of your form.

Code:
If Me.NewRecord Then
        Me.txtResult = "New Record (" & Me.RecordsetClone.RecordCount & " existing records)"
    Else
       Me.txtResult = "Record " & [CurrentRecord] & " of " & Me.RecordsetClone.RecordCount
    End If

Put an unbound text box on your form and name it txtResult.

This should do what you want.
 
ansentry said:
Code:
If Me.NewRecord Then
        Me.txtResult = "New Record (" & Me.RecordsetClone.RecordCount & " existing records)"
    Else
       Me.txtResult = "Record " & [CurrentRecord] & " of " & Me.RecordsetClone.RecordCount
    End If
That code looks familiar. :D Record X of Y
 
sorry for the late reply..been on a training course.

It works nicely.

Many many many thanks! much appreciate. I know you are busy replying to many other posts.
 

Users who are viewing this thread

Back
Top Bottom