How do I decompose a string for a report

  • Thread starter Thread starter ericb
  • Start date Start date
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.
 
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
 
Back
Top