By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,905 Members | 2,083 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,905 IT Pros & Developers. It's quick & easy.

Null Propagation Issue

P: n/a
Hi,

I am attempting to build a full name of a doctor using combo box
values, but all of the additional characters (commas, spaces, periods)
are returned.

Any help you can lend would be appreciated.

Henry
=====================

Here is the code:

strFullName = ((Me.cboAddPhysician.Column(10)) + " ") & _
((Me.cboAddPhysician.Column(11)) + ". ") & _
((Me.cboAddPhysician.Column(9) + " ")) & _
((", " + Me.cboAddPhysician.Column(12)) + ". ") & _
(Me.cboAddPhysician.Column(13))

(column map -> 10 is first name, 11 is middle, 9 is last name, 12 is
suffix, and 13 is degree.)

May 18 '06 #1
Share this Question
Share on Google+
4 Replies


P: n/a
The most glaring thing I see is the +'s should be &'s. You are
concantenating strings and need the &.

Henry Stockbridge wrote:
Hi,

I am attempting to build a full name of a doctor using combo box
values, but all of the additional characters (commas, spaces, periods)
are returned.

Any help you can lend would be appreciated.

Henry
=====================

Here is the code:

strFullName = ((Me.cboAddPhysician.Column(10)) + " ") & _
((Me.cboAddPhysician.Column(11)) + ". ") & _
((Me.cboAddPhysician.Column(9) + " ")) & _
((", " + Me.cboAddPhysician.Column(12)) + ". ") & _
(Me.cboAddPhysician.Column(13))

(column map -> 10 is first name, 11 is middle, 9 is last name, 12 is
suffix, and 13 is degree.)


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ccess/200605/1
May 18 '06 #2

P: n/a
"Henry Stockbridge" <hs***********@hotmail.com> wrote in
news:11**********************@y43g2000cwc.googlegr oups.com:
I am attempting to build a full name of a doctor using combo box
values, but all of the additional characters (commas, spaces,
periods) are returned.

Any help you can lend would be appreciated.

Henry
=====================

Here is the code:

strFullName = ((Me.cboAddPhysician.Column(10)) + " ") & _
((Me.cboAddPhysician.Column(11)) + ". ") & _
((Me.cboAddPhysician.Column(9) + " ")) & _
((", " + Me.cboAddPhysician.Column(12)) + ". ") & _
(Me.cboAddPhysician.Column(13))

(column map -> 10 is first name, 11 is middle, 9 is last name, 12
is suffix, and 13 is degree.)


Do Null columns in combo boxes return a Null or a zero-length
string?

This is the kind of thing I'd do in the combo box's rowsource, not
somewhere else. In that case, there's no question that the +
operator will propagate the Nulls.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
May 18 '06 #3

P: n/a
Thanks for the help. I found out the underlying tables allow zero
length strings, so I went the IIf route instead. :-(

May 19 '06 #4

P: n/a
"Henry Stockbridge" <hs***********@hotmail.com> wrote in
news:11*********************@y43g2000cwc.googlegro ups.com:
Thanks for the help. I found out the underlying tables allow zero
length strings, so I went the IIf route instead. :-(


I'd change the tables to disallow ZLS.

I've also written a ZLSToNull() function that I use for cases like
this where I can't get around dealing with ZLS's. It's pretty easy
to figure out how to do it, so I won't post the code.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
May 19 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.