473,394 Members | 1,679 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,394 software developers and data experts.

If text box is blank I don't want it to leave an empty space in address

I am trying to send out letters.

PhysicianName
PrimaryHospital
Address1
Address2
Address3
CityStateZipCode

Some of the fields are blank (example: address3 tends to be blank unless there is a Suite in the address). How do I make it so that if any of these fields are blank there will not be a gap in between the address. Right now this is how some of the addresses look...

Dr. Smith
University Hospital
111 Drive N

Los Angeles, CA 88888

How do I make the field below the blank field move up?
Sep 28 '10 #1
1 2087
nico5038
3,080 Expert 2GB
You can do that by concatenating the fields in your query like:
Expand|Select|Wrap|Line Numbers
  1. PhysicianName & vbCRLF & PrimaryHospital & vbCRLF & Address1 + vbCRLF & Address2 + vbCRLF & Address3 + vbCRLF & CityStateZipCode
  2.  
This will result in one address field with only filled lines. The "+" will cause a NULL address to disapear as the vbCRLF (carriage return) will be suppressed.

Nic;o)
Sep 28 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: SP | last post by:
I've production sql server 7 sp3 on windows NT. I had a 8GB data file of which 5GB were used and 3GB were unused. I wanted to take back the unused 3GB. So I did the following with EM GUI: 1. I...
3
by: Not Me | last post by:
Hi, I have a report, viewable in continuous form. I don't want the size of the report to change (it should fit address labels on the printer), but in order to minimise the space between empty...
7
by: Anne M | last post by:
I have a report based on query..which is a team list with names and their role on team ie coach, assistant and player. Report is almost what I want and my knowledge is limited so I need some...
3
by: bitwxtadpl | last post by:
I want to programmatically set the position of a cursor in a textbox that has focus based on a X and Y value. However, when I send a WM_RBUTTONDOWN and a WM_RBUTTONUP message to the textbox it...
3
by: Husam | last post by:
Hi EveryBody: I made project by Vb.Net which consist the following items: 1\ Textbox 2\Button 3\Listbox When you write any thing in the textbox and press the button any text written in...
0
by: Blue203 | last post by:
I am trying to make a div scroll box that holds code for a "banner" in text form (so that other people can copy it and repost it). I have the box made and the code inside works, however the problem...
21
by: jehugaleahsa | last post by:
Hello: I had an hour-long discussion with my boss today. Last night, right before I dozed off, I realized some of his code resulted in duplicate processing. I tried to explain it to him and he...
1
by: alindtiwari | last post by:
i am designing a drop down menu, n i don't want a big space bet main menu and submenu, submenu are created using ul tag it looks like this Menu1 link 1 link2 menu 2
2
by: Smurfas | last post by:
Hi, I have another problem. I char converter to string = variable; , and now string text end is empty place. I must new string(variable) plus word: "end"; Very simple: a = variable + "end"; But...
2
by: Sep410 | last post by:
It is funy qouestion but I need to know. How can I cut long if statement into multiline statement? I can remember using &_ but it is an error now. EXP: If txtLastNameSec.Text <> "" Or...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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:
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.