How do I decompose a string for a report

E

ericb

In a data field is a text string that is always like this : item1, item2, item3

The number of items is variable.

I want them in a report presented like this:

Your selected items :
- item1
- item2
- item3

How do I manage that one, can somebody help me.

Thank you.
 
R

Roger Carlson

J

John Spencer

If you just want to reformat the field so it has line feeds instead of the
comma and a dash and a space, you can use the Replace function to do that
temporarily.

Set the control's source to:
= " - " & Replace([NameOfField],",",Chr(13) & Chr(10) & " - ")

Make sure the control does not have the same name as a field. Also set the
control's can grow property to yes.

John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
 

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