List Top 10 in report header

lmonroe

Registered User.
Local time
Today, 08:49
Joined
May 19, 2011
Messages
16
I have a query which returns the top 10 contract numbers based on a predetermined rank. Right now the report is very detailed which ends up with one contract per page. Does anyone know a way to list the top 10 in the report header so it would look like this?

1. Contract A
2. Contract B
3. Contract C

etc...

I greatly appreciate the help!
 
With a Textbox txtHeaderContractList in the Report Header,
Something like this:-
Code:
Private Sub ReportHeader_Format(intCancel As Integer, _
                                intFormatCount As Integer)
                                
    Dim strContracts As String
    Dim intIndex     As Integer

    With CurrentDb.OpenRecordset(Me.RecordSource)
        Do Until .EOF
            intIndex = intIndex + 1
            strContracts = strContracts & CStr(intIndex) & ". " & !Contract & vbNewLine
            .MoveNext
        Loop
    End With
    
    Me.txtHeaderContractList = strContracts

End Sub

Chris.
 

Users who are viewing this thread

Back
Top Bottom