Showing Only Labels in the First Column of a Report

G

Guest

I've used the instructions in article Q208491 to set up a multi-column report
with lables in only the first column. I created disassociated labels and
text boxes, placed the labels directly over the text boxes and made the
textboxes, labels and report width all 1.5". Then I wrote code in the
OnFormat of the detail section:

If Me.Left < (1.5 * 1440) Then
Me![lbl1].Visible = True
Me![lbl2].Visible = True
Me![lbl3].Visible = True
Me![txt1].Visible = False
Me![txt2].Visible = False
Me![txt3].Visible = False
Else
Me![lbl1].Visible = False
Me![lbl2].Visible = False
Me![lbl3].Visible = False
Me![txt1].Visible = True
Me![txt2].Visible = True
Me![txt3].Visible = True
EndIf

I set the # columns to 5, which fit nicely on my report. The problem is
that the labels are covering up data. I am trying to show Jan. - Aug. data
on the report and the 1st page shows Feb. Mar. Apr. May and the 2nd page
shows July & Aug. It's almost like the labels are covering up the first
colum of data on each page, Jan. & June. Seems to defeat the purpose, so I
must be doing something wrong. Any ideas? Thank you.
 
M

Marshall Barton

Alex said:
I've used the instructions in article Q208491 to set up a multi-column report
with lables in only the first column. I created disassociated labels and
text boxes, placed the labels directly over the text boxes and made the
textboxes, labels and report width all 1.5". Then I wrote code in the
OnFormat of the detail section:

If Me.Left < (1.5 * 1440) Then
Me![lbl1].Visible = True
Me![lbl2].Visible = True
Me![lbl3].Visible = True
Me![txt1].Visible = False
Me![txt2].Visible = False
Me![txt3].Visible = False
Else
Me![lbl1].Visible = False
Me![lbl2].Visible = False
Me![lbl3].Visible = False
Me![txt1].Visible = True
Me![txt2].Visible = True
Me![txt3].Visible = True
EndIf

I set the # columns to 5, which fit nicely on my report. The problem is
that the labels are covering up data. I am trying to show Jan. - Aug. data
on the report and the 1st page shows Feb. Mar. Apr. May and the 2nd page
shows July & Aug. It's almost like the labels are covering up the first
colum of data on each page, Jan. & June. Seems to defeat the purpose, so I
must be doing something wrong.


Since you've made the text boxes invisible when the data is
in the left most column, they won't be displayed. What you
need to do is process the first column's data records a
second time to get them to display in the second column.
This is very easy to do by adding:
Me.NextRecord = False
to the true block of the If statement.
 
G

Guest

Perfect! Thank you -

Marshall Barton said:
Alex said:
I've used the instructions in article Q208491 to set up a multi-column report
with lables in only the first column. I created disassociated labels and
text boxes, placed the labels directly over the text boxes and made the
textboxes, labels and report width all 1.5". Then I wrote code in the
OnFormat of the detail section:

If Me.Left < (1.5 * 1440) Then
Me![lbl1].Visible = True
Me![lbl2].Visible = True
Me![lbl3].Visible = True
Me![txt1].Visible = False
Me![txt2].Visible = False
Me![txt3].Visible = False
Else
Me![lbl1].Visible = False
Me![lbl2].Visible = False
Me![lbl3].Visible = False
Me![txt1].Visible = True
Me![txt2].Visible = True
Me![txt3].Visible = True
EndIf

I set the # columns to 5, which fit nicely on my report. The problem is
that the labels are covering up data. I am trying to show Jan. - Aug. data
on the report and the 1st page shows Feb. Mar. Apr. May and the 2nd page
shows July & Aug. It's almost like the labels are covering up the first
colum of data on each page, Jan. & June. Seems to defeat the purpose, so I
must be doing something wrong.


Since you've made the text boxes invisible when the data is
in the left most column, they won't be displayed. What you
need to do is process the first column's data records a
second time to get them to display in the second column.
This is very easy to do by adding:
Me.NextRecord = False
to the true block of the If statement.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top