Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need Help on Controlling a Label

Status
Not open for further replies.

Pluto87

Programmer
Oct 7, 2011
23
US
Hi,

I need some help on controlling a label. I have an application where data is pulling from an access database and it is using the sqldatasource as the connection. In the application, address information is being displayed as the user chooses a LastName.

I need help on controlling a label when a lastname has 2 addresses. When a lastname has 2 addresses, there is the word "or" showing 2 addresses.

For example:

111 Jasmind Drive
Los Angelas, CA 12344

or

123 Main Street
Los Angelas, CA 12344


I need the "Or" to only show when there is a 2nd address.

Please tell me if this is possible.

Thanks in advance!! Any suggestions or tips is very much appreciated!
 

It's possible. If you can detect if there is a second address or not, you can use:

Code:
lblOrLable.text = IIf(<ThereIsASecondAddress>, " or ", "")


Mark

"You guys pair up in groups of three, then line up in a circle."
- Bill Peterson, a Florida State football coach
 
Thanks for the reply. Could you be a little more specific?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top