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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Making Results in Report go to Multiple Lines

Status
Not open for further replies.

bdavid50

Technical User
Apr 13, 2001
9
US
This may be difficult to explain or I may be approaching the whole issue wrong. I am developing a small database the has multiple numbers in a single field seperated by a comma. The field will be populated as follows 25648, 28964-01, 89745, etc., not every entry has the same set of numbers or are consistent. When I run the report using a query on this field I would like the report output to look like this

Number

25648,
28964-01,
89745,

But instead my output looks like this

Number

25648, 28964-01, 89745,


Is there a way for the report to look at the query results and put a break to a new line each time a comma (or any other delimiter) is used, so that the desired results is achieved.

I hope this is clear enough
Thank you for your help

bdavid50
bdavid50@aol.com
 
You can just use the "Replace" function to solve the problem. Try the following expression in the debug mode.

replace("25648, 28964-01, 89745",", ","," & chr(13) & chr(10))

Assuming the field's name is "AccoutNumbers" and the table name is "customers," you may use the following query

Select Replace([AccountNumbers],", ","," & chr(13) & chr(10)) from Customers

Seaport
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top