Move Rows up to Blank Area. Plz Help

G

Guest

I EXPLAINED IT WRONG ON MY OTHER LISTING!
I have a report that has several rows and colunms as follows. I have it set
up if a check box is true to show the entire Row or Rows for each Column.
What I need now is, if row 2 is null (all blank) I want row 3 and row 4 to
move up into
row 2's position so it will not show a blank where row 2 once was. How do I
get the entire row that is True to move up and take its place?

EXAMPLE:

.............Column 1.......Column 2.......Column 3..........colunm 4

1................0.99............1.34..............66.6................5.55

2. ................I want row 3 an 4 to move up to this position.......

3.................00.34........3.44...............0.34.................6.77

4.................0.64...........1.23..............22.89..................0.9
 
S

Steve

On your report, select the textbox for Column 1. Open properties and go to
the Format tab. Set Can Shrink to Yes. Do the same for the textboxes for
Volumn 2 to Column 4.

PC Datasheet
Providing Customers A Resource For Help With Access, Excel And Word
Applications
(e-mail address removed)
 
G

Guest

Karl,

That would be nice if I had a place to strt. I only looked in 4 books and
asked around and NO HELP!
 
G

Guest

I forgot to mention I dont see how an entire row or rows can move up and
replace an entire row in a report. How would this work? How can the valid
rows move up to take the null rows place. I am at a hugh LOSS!
 
K

krissco

I EXPLAINED IT WRONG ON MY OTHER LISTING!
I have a report that has several rows and colunms as follows. I have it set
up if a check box is true to show the entire Row or Rows for each Column.
What I need now is, if row 2 is null (all blank) I want row 3 and row 4 to
move up into
row 2's position so it will not show a blank where row 2 once was. How do I
get the entire row that is True to move up and take its place?

EXAMPLE:

............Column 1.......Column 2.......Column 3..........colunm 4

1................0.99............1.34..............66.6................5.55

2. ................I want row 3 an 4 to move up to this position.......

3.................00.34........3.44...............0.34.................6.77

4.................0.64...........1.23..............22.89..................0.9

I'll assume this is in the Detail section.
Use this as the code behind the Format event of the detail section:

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If IsNull(Me.testControl) Then
Me.Section("detail").Visible = False
Else
Me.Section("detail").Visible = True
End If
End Sub

Or more succinctly:
Me.Section("Detail").Visible = not isnull(Me.testControl)

Replace Me.testControl with whatever control(s) you want to test to
see if your record is null.

-Kris
 
G

Guest

Steve,

I set all of my Text boxes to YES on can shrink. Nothing happends. I set the
option box and all of the text boxes associated with the option box. I still
have a blank where row 2 use to be and row 3 and 4 are below it. Any other
 
G

Guest

Krissco,

OK so what does this do. I added it into onformat and it does nothing so I
guess that is good? Thanks gain and please advise what I should do next.
 
K

krissco

Krissco,

OK so what does this do. I added it into onformat and it does nothing so I
guess that is good? Thanks gain and please advise what I should do next.
The code will show/hide the detail section based on criteria. When it
is hidden, instead of printing a "blank row" of data - the report will
print nothing. Upon formatting the next non-null row, the section will
be marked visible and will print.

-Kris
 
S

Steve

Do you have anything to the left or right of the rows. Can shrink won't work
if there is anything there.

PC Datasheet
Providing Customers A Resource For Help With Access, Excel And Word
Applications
(e-mail address removed)
 
G

Guest

I have tones of other fields in the detail section besides this portion. This
is a demographical section they wanted me to add to an existing report. It is
set up correctly except for the rows not moving up to take the place of other
rows where the option box has not been selcted. I have heard everything from
can shrink to do it in the query to????? I am lost as how to get these to
move up. They are 5 coloumns accross and 5 rows down. Any other ideas would
be helpful and thanks again to all that is trying to help me on this one.
 
G

Guest

Steve,

I have text boxes like.the following.If a check box is null and it is
accosiated with line two (a check box makes the 4 other text boxes visible or
not). I want row 3 and 4 to move into number 2's position. Each one of the
below is a text box. Does that help?
 
G

Guest

By using criteria in your query for the report the "row" is never developed,
so if it never existed then any results afterwards is automatically moved up.

What is the Record Source for your report?
 
K

krissco

By using criteria in your query for the report the "row" is never developed,
so if it never existed then any results afterwards is automatically moved up.

What is the Record Source for your report?

Thats wonderfully simple - no wonder why I didn't think of it!

-Kris
 
S

Steve

Where is the checkbox relative to the textboxes in each row? Is the 1, 2, 3,
4 your numbers for reference or are they part of the data? Are they also
textboxes?

PC Datasheet
Providing Customers A Resource For Help With Access, Excel And Word
Applications
(e-mail address removed)
 

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