473,427 Members | 1,839 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,427 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 19491
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

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.