J
John D
MS has a Knowledge Base article describing how to "modify a report so that
when you print a multicolumn report, the labels for each row of information
in the columns are printed only along the left margin of the report."
(This is, of course, exactly what financial statement models in spreadsheets
usually look like - yet Access appears not to provide an "easy" report model
for this very fundamental type of report - but that's another story.)
http://support.microsoft.com/default.aspx?scid=kb;en-us;210044&Product=acc
The article presents a method to accomplish this, which includes seting the
OnFormat property of the Detail section to:
Dim i As Integer If Me.Left <Me.Width Then Me.NextRecord = False For i = 1
To 11 Me("txt" & i).Visible = False Me("lbl" & i).Visible = True Next i Else
For i = 1 To 11 Me("txt" & i).Visible = True Me("lbl" & i).Visible = False
Next i End If
My application has 22 fields, not 11. But I followed the step by step
instructions of this KB article exactly, except I changed the two references
to the number of "txt" and "lbl" fields to "1 to 22". Everything is set up
exactly as in this KB article except for this one difference. (I used the
Code Builder to enter and edit the Event Procedure above.)
But when I try to view the report I get an error message saying "Expected:
Identifier".
Can anyone see either what I'm doing wrong or what is wrong with the
KB-suggested Event Procedure?
Thanks
John D
when you print a multicolumn report, the labels for each row of information
in the columns are printed only along the left margin of the report."
(This is, of course, exactly what financial statement models in spreadsheets
usually look like - yet Access appears not to provide an "easy" report model
for this very fundamental type of report - but that's another story.)
http://support.microsoft.com/default.aspx?scid=kb;en-us;210044&Product=acc
The article presents a method to accomplish this, which includes seting the
OnFormat property of the Detail section to:
Dim i As Integer If Me.Left <Me.Width Then Me.NextRecord = False For i = 1
To 11 Me("txt" & i).Visible = False Me("lbl" & i).Visible = True Next i Else
For i = 1 To 11 Me("txt" & i).Visible = True Me("lbl" & i).Visible = False
Next i End If
My application has 22 fields, not 11. But I followed the step by step
instructions of this KB article exactly, except I changed the two references
to the number of "txt" and "lbl" fields to "1 to 22". Everything is set up
exactly as in this KB article except for this one difference. (I used the
Code Builder to enter and edit the Event Procedure above.)
But when I try to view the report I get an error message saying "Expected:
Identifier".
Can anyone see either what I'm doing wrong or what is wrong with the
KB-suggested Event Procedure?
Thanks
John D