Rabu, 01 Oktober 2014

RE: [MS_AccessPros] multi colums report

 

You might want to consider using this very old but possibly still viable method:
https://support2.microsoft.com/kb/210044?wa=wsignin1.0
 
Duane Hookom MVP (2014!)
MS Access
 

To: MS_Access_Professionals@yahoogroups.com
From: MS_Access_Professionals@yahoogroups.com
Date: Tue, 30 Sep 2014 16:41:02 -0700
Subject: RE: [MS_AccessPros] multi colums report



Have you considered building your data in a temp table first.  Would require a lot less fussing around with the report.

From: saigonf7q5@yahoo.com [MS_Access_Professionals]
Sent: ‎9/‎30/‎2014 12:07 PM
To: MS_Access_Professionals@yahoogroups.com
Subject: [MS_AccessPros] multi colums report

 

 I have a multicolumns report, which is the labels (column headings) are displayed on the left side of the report,
and the data is printed next (on the right side) to the labels. As an example shown below.
-----------------------------------------------------------------------
                         Company1    Company2    Company3 
Current Month  09/08/2014    09/08/2014   09/08/2014 
Line1 Data        ABC              DEF              GHI

Prior Month      08/08/2014    08/08/2014   08/08/2014  
Line1 Data       STU               VXYZ            CBA
-----------------------------------------------------------------------
The procedure below is the code that I use to generate the report above.
 
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
On Error GoTo ErrorHandler
Dim i As Integer
If Me.Left < 1.75 * 1440 Then
    Me.NextRecord = False
    For i = 1 To 5
        Me("txt" & i).Visible = False
        Me("lbl" & i).Visible = True
    Next i
Else
    For i = 1 To 5
        Me("txt" & i).Visible = True
        Me("lbl" & i).Visible = False
    Next i
End If
ExitProcedure:
Exit Sub
ErrorHandler:
    MsgBox "Error Number: " & Err.Number & vbNewLine & "Error Description: " & Err.Description, vbExclamation
    Resume ExitProcedure
End Sub

Now, is it possible to format the report, insert the Prior Month before the Current month,
so the data will be printed as a column, side by side, next to each other like this.
 
-------------------------------------------------------------------------------------------------------------------------
Prior Month    Current Month    Prior Month     Current Month   Prior Month    Current Month  
Company1     Company1         Company2       Company2        Company3      Company 3 
08/08/2014     09/08/2014        08/08/2014      09/08/2014        08/08/2014     09/08/2014 
STU                ABC                   VXYZ              DEF                   CBA               GHI
--------------------------------------------------------------------------------------------------------------------------
Phucon.




__._,_.___

Posted by: Duane Hookom <duanehookom@hotmail.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (3)

.

__,_._,___

Tidak ada komentar:

Posting Komentar