cbo to go to new line after comma

A

Arnold Klapheck

I am displaying a multiple selection in a combo box on a report. I have named
it cboBSCCourse with it's control set to the field BSCCourse in a bridge
table. the number of items can be from 4 to 7 it lists them out with a comma
after each one. I want it to to to the next line after the comma.

currently like this
item one, item two, item
three, item four

I want to look like this
item one,
item two,
item three,
item four


I have been trying to use the replace command like below but cannot get it
to work,
Since I am using a variable number of items I am thinking I might have to
use a loop to go through the items.

can someone help me to figure this out

should I put this in the control source of cboBSCCourse?
=Replace([BSCCourse],",",", " & chr(13) & chr(10))
 
J

John Spencer

Try replacing the comma with a semi-colon (;). Semi-colon is the usual
character for splitting the list into individual items

--
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
A

Arnold Klapheck

Access is supplying the commas, the list comes from a lookup field that
allows multiple selections.

John Spencer said:
Try replacing the comma with a semi-colon (;). Semi-colon is the usual
character for splitting the list into individual items

--
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
..

Arnold Klapheck said:
I am displaying a multiple selection in a combo box on a report. I have
named
it cboBSCCourse with it's control set to the field BSCCourse in a bridge
table. the number of items can be from 4 to 7 it lists them out with a
comma
after each one. I want it to to to the next line after the comma.

currently like this
item one, item two, item
three, item four

I want to look like this
item one,
item two,
item three,
item four


I have been trying to use the replace command like below but cannot get it
to work,
Since I am using a variable number of items I am thinking I might have to
use a loop to go through the items.

can someone help me to figure this out

should I put this in the control source of cboBSCCourse?
=Replace([BSCCourse],",",", " & chr(13) & chr(10))
 
J

John Spencer

What version of Access? 2007? Multi-value field?

IF 2007, repost the question. I do not work with 2007 (yet) and cannot give
you reasonable advice if you are using any of its new features.

--
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
..

Arnold Klapheck said:
Access is supplying the commas, the list comes from a lookup field that
allows multiple selections.

John Spencer said:
Try replacing the comma with a semi-colon (;). Semi-colon is the usual
character for splitting the list into individual items

--
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
..

Arnold Klapheck said:
I am displaying a multiple selection in a combo box on a report. I have
named
it cboBSCCourse with it's control set to the field BSCCourse in a
bridge
table. the number of items can be from 4 to 7 it lists them out with a
comma
after each one. I want it to to to the next line after the comma.

currently like this
item one, item two, item
three, item four

I want to look like this
item one,
item two,
item three,
item four


I have been trying to use the replace command like below but cannot get
it
to work,
Since I am using a variable number of items I am thinking I might have
to
use a loop to go through the items.

can someone help me to figure this out

should I put this in the control source of cboBSCCourse?
=Replace([BSCCourse],",",", " & chr(13) & chr(10))
 
A

Arnold Klapheck

Yes it is 2007, I will repost

John Spencer said:
What version of Access? 2007? Multi-value field?

IF 2007, repost the question. I do not work with 2007 (yet) and cannot give
you reasonable advice if you are using any of its new features.

--
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
..

Arnold Klapheck said:
Access is supplying the commas, the list comes from a lookup field that
allows multiple selections.

John Spencer said:
Try replacing the comma with a semi-colon (;). Semi-colon is the usual
character for splitting the list into individual items

--
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
..

message I am displaying a multiple selection in a combo box on a report. I have
named
it cboBSCCourse with it's control set to the field BSCCourse in a
bridge
table. the number of items can be from 4 to 7 it lists them out with a
comma
after each one. I want it to to to the next line after the comma.

currently like this
item one, item two, item
three, item four

I want to look like this
item one,
item two,
item three,
item four


I have been trying to use the replace command like below but cannot get
it
to work,
Since I am using a variable number of items I am thinking I might have
to
use a loop to go through the items.

can someone help me to figure this out

should I put this in the control source of cboBSCCourse?
=Replace([BSCCourse],",",", " & chr(13) & chr(10))
 
L

Larry Linson

I suggest you convert the multi-value field to a related table with those
items. Multi-valued fields (euphemism to avoid calling them that, "complex
data") are a violation of relational database design principles... they,
lookup fields, subdatasheets, and other non-relational features are useful
primarily for end-users working directly in datasheet view. When you get
beyond that, they can be, as you have seen, "more trouble than they are
worth."

Larry Linson
Microsoft Access MVP


Arnold Klapheck said:
Yes it is 2007, I will repost

John Spencer said:
What version of Access? 2007? Multi-value field?

IF 2007, repost the question. I do not work with 2007 (yet) and cannot
give
you reasonable advice if you are using any of its new features.

--
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
..

Arnold Klapheck said:
Access is supplying the commas, the list comes from a lookup field that
allows multiple selections.

:

Try replacing the comma with a semi-colon (;). Semi-colon is the
usual
character for splitting the list into individual items

--
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
..

message I am displaying a multiple selection in a combo box on a report. I
have
named
it cboBSCCourse with it's control set to the field BSCCourse in a
bridge
table. the number of items can be from 4 to 7 it lists them out with
a
comma
after each one. I want it to to to the next line after the comma.

currently like this
item one, item two, item
three, item four

I want to look like this
item one,
item two,
item three,
item four


I have been trying to use the replace command like below but cannot
get
it
to work,
Since I am using a variable number of items I am thinking I might
have
to
use a loop to go through the items.

can someone help me to figure this out

should I put this in the control source of cboBSCCourse?
=Replace([BSCCourse],",",", " & chr(13) & chr(10))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top