472,374 Members | 1,517 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,374 software developers and data experts.

Eliminate Blank Rows

I have a mailing label report and would like to remove the space taken up by
rows with no info (move the other rows up).
I am a beginner using MS Access 2000 and would appreciate any help.

Thanks
Richard
Nov 13 '05 #1
7 19084
You have a couple of options. If you mean that when you run a query, some
rows have no information, you can set the criteria of one of the fields to:
<>"" And Is Not Null

If you are basing the report on a table directly, you can use a Delete query
to remove the empty rows. Something like:
Delete * from Your_Table Where Your_Field is null;

If you set a primary key to your tables, you will not have the problem of
having entire rows with no information

Mark
"Richard Yardley" <rh*@iafrica.com> wrote in message
news:r4********************@is.co.za...
I have a mailing label report and would like to remove the space taken up
by
rows with no info (move the other rows up).
I am a beginner using MS Access 2000 and would appreciate any help.

Thanks
Richard

Nov 13 '05 #2
Hi Mark,

Thanks for the response, but maybe I didn't make myself clear.
I am printing labels from a query. The query has fields amongst others,
"address1" and "address 2". In my label report, I have fields stacked
vertically with "address1" followed by "address2" followed by "Town". If the
field for "address 2" is empty for a particular record, I want the
placeholder for "address 2" to disappear in the report so that the "Town"
field follows directly under "address1" - i.e. eliminate the blank space
that I'm getting at the moment. I hope this makes sense!!

Regards,
Richard
--

Regards,
Richard

(H) 031 309 8133
(C) 082 851 1415

33 Jubilee Court
93 Clarence Road
Essenwood
Durban 4001
"Mark" <ma**********@ntlworld.com> wrote in message
news:cc************@newsfe3-win.ntli.net...
You have a couple of options. If you mean that when you run a query, some
rows have no information, you can set the criteria of one of the fields to: <>"" And Is Not Null

If you are basing the report on a table directly, you can use a Delete query to remove the empty rows. Something like:
Delete * from Your_Table Where Your_Field is null;

If you set a primary key to your tables, you will not have the problem of
having entire rows with no information

Mark
"Richard Yardley" <rh*@iafrica.com> wrote in message
news:r4********************@is.co.za...
I have a mailing label report and would like to remove the space taken up
by
rows with no info (move the other rows up).
I am a beginner using MS Access 2000 and would appreciate any help.

Thanks
Richard


Nov 13 '05 #3
On your label report, right click on the address2 field and go to
Properties. Click the Format tab, then set the 'Can Shrink' property
to 'Yes'. Hope this helps!

Bruce

Nov 13 '05 #4
Thanks for the suggestion Bruce. I tried the "CAN SHRINK" format option in
my report on a field and it worked fine when the field didn't contain data,
the lower fields moved up. Perfect, but some fields contain the following
expression for example:
=([StreetNumber] & " " & [StreetName])
and I guess because there is a space (" "), the field does not shrink.
I tried =TRIM([StreetNumber] & " " & [StreetName]) and =CLEAN([StreetNumber]
& " " & [StreetName]), but get an "Enter the parameter value" prompt.
Any suggestions??

--

Regards,
Richard

(H) 031 309 8133
(C) 082 851 1415

33 Jubilee Court
93 Clarence Road
Essenwood
Durban 4001
<br***@aristotle.net> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
On your label report, right click on the address2 field and go to
Properties. Click the Format tab, then set the 'Can Shrink' property
to 'Yes'. Hope this helps!

Bruce

Nov 13 '05 #5
I have dealt with similar issues by using an "if" statement.

Something like:

=iif([StreetNumber]is null,"",[StreetNumber]&" "&[StreetName])

that way if there is no street number (you could do the same thing with
StreetName of course) then it will go to the next line without putting
in the space.

Richard Yardley wrote:
Thanks for the suggestion Bruce. I tried the "CAN SHRINK" format option in
my report on a field and it worked fine when the field didn't contain data,
the lower fields moved up. Perfect, but some fields contain the following
expression for example:
=([StreetNumber] & " " & [StreetName])
and I guess because there is a space (" "), the field does not shrink.
I tried =TRIM([StreetNumber] & " " & [StreetName]) and =CLEAN([StreetNumber]
& " " & [StreetName]), but get an "Enter the parameter value" prompt.
Any suggestions??

--

Regards,
Richard

(H) 031 309 8133
(C) 082 851 1415

33 Jubilee Court
93 Clarence Road
Essenwood
Durban 4001
<br***@aristotle.net> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
On your label report, right click on the address2 field and go to
Properties. Click the Format tab, then set the 'Can Shrink' property
to 'Yes'. Hope this helps!

Bruce


Nov 13 '05 #6

"Richard Yardley" <rh*@iafrica.com> wrote
Thanks for the suggestion Bruce. I tried the "CAN SHRINK" format option in
my report on a field and it worked fine when the field didn't contain data, the lower fields moved up. Perfect, but some fields contain the following
expression for example:
=([StreetNumber] & " " & [StreetName])
and I guess because there is a space (" "), the field does not shrink.
I tried =TRIM([StreetNumber] & " " & [StreetName]) and =CLEAN([StreetNumber] & " " & [StreetName]), but get an "Enter the parameter value" prompt.
Any suggestions??

Using + to concatenate the strings will result in a Null value rather than a
space when needed. For instance,

(StreetNumber + " ") & StreetName

will not have a leading space, since Null + " " = Null
After the parenthesis, the result of the Addition will be Null & StreetName,
which concatenates as you are used to.
Darryl Kerkeslager
Nov 13 '05 #7
Darryl, your solution worked perfectly - thank you

Regards,
Richard
Durban 4001

"Darryl Kerkeslager" <Ke*********@comcast.net> wrote in message
news:B9********************@comcast.com...

"Richard Yardley" <rh*@iafrica.com> wrote
Thanks for the suggestion Bruce. I tried the "CAN SHRINK" format option in my report on a field and it worked fine when the field didn't contain data,
the lower fields moved up. Perfect, but some fields contain the following expression for example:
=([StreetNumber] & " " & [StreetName])
and I guess because there is a space (" "), the field does not shrink.
I tried =TRIM([StreetNumber] & " " & [StreetName]) and

=CLEAN([StreetNumber]
& " " & [StreetName]), but get an "Enter the parameter value" prompt.
Any suggestions??

Using + to concatenate the strings will result in a Null value rather than

a space when needed. For instance,

(StreetNumber + " ") & StreetName

will not have a leading space, since Null + " " = Null
After the parenthesis, the result of the Addition will be Null & StreetName, which concatenates as you are used to.
Darryl Kerkeslager

Nov 13 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: VM | last post by:
In the Windows datagrid (if read-only is false), a user can add another row to the grid if the Tab key is pressed when the cursor's in the last row and last column. Is there any way to eliminate...
1
by: satya.mahesh | last post by:
Hi All, I am working on a problem which "eliminates blank lines in export (between headings and when a heading is empty)". I want a macro which will do this job for me. For e.g: Heading1 ...
1
by: yasin | last post by:
For instance there is a column which grabs city names from Sql Database, I want only see the rows whose city is new york.
10
by: ranjitkumar | last post by:
Hi, Do anyone know a query for the following senario, I have a table in which i have multiple rows with the same entry. I want to keep only one copy of such rows. How to write a query to delete...
2
by: Drew | last post by:
Hi all - I've written a simple script to read a .csv file and then write out rows to a new file only if the value in the 4th column is a 0. Here's the code: import csv reader =...
2
by: padawanlinuxero | last post by:
I have a program that goes to a MySQL table and puts all the data of the table in a CSV file, now I want to leave 6 rows in blank at top of the file when open in Excel, but I dont know how to do...
10
by: maryanncanor | last post by:
hi, Good day. I use Ms Access 2003 to export data from table to TEXTFILE. this is my Actual output: EMP003 Matt Dwayne EMP001 Josh Harnett EMP005 Peter Parker
1
by: premMS143 | last post by:
Hi 1 & all, Using VB, How to remove blank rows in a Excel worksheet? For example, I'm having a Excel sheet containing 900 rows data, in which there are blank rows inserted in between. Manually...
2
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and efficiency. While initially associated with cryptocurrencies...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was proposed, which integrated multiple engines and...
1
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web server and have made sure to enable curl. I get a...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the synthesis of my design into a bitstream, not the C++...
2
by: Ricardo de Mila | last post by:
Dear people, good afternoon... I have a form in msAccess with lots of controls and a specific routine must be triggered if the mouse_down event happens in any control. Than I need to discover what...
1
by: Johno34 | last post by:
I have this click event on my form. It speaks to a Datasheet Subform Private Sub Command260_Click() Dim r As DAO.Recordset Set r = Form_frmABCD.Form.RecordsetClone r.MoveFirst Do If...
1
by: ezappsrUS | last post by:
Hi, I wonder if someone knows where I am going wrong below. I have a continuous form and two labels where only one would be visible depending on the checkbox being checked or not. Below is the...
0
by: jack2019x | last post by:
hello, Is there code or static lib for hook swapchain present? I wanna hook dxgi swapchain present for dx11 and dx9.
0
DizelArs
by: DizelArs | last post by:
Hi all) Faced with a problem, element.click() event doesn't work in Safari browser. Tried various tricks like emulating touch event through a function: let clickEvent = new Event('click', {...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.