View Full Version : Combine multiple field values into one field in Report


ashishdatta
01-15-2010, 09:50 AM
I have 3 different date fields in the Table and I'm using Form to enter value into the fields. I need to combine the values of these 3 fields and show it into one field in the Report with each value in the different line. Is there a way of doing this? I'm new into Access 2003 and would be great if any input is given.

Thanks.

themurph2000
01-15-2010, 10:41 AM
I have 3 different date fields in the Table and I'm using Form to enter value into the fields. I need to combine the values of these 3 fields and show it into one field in the Report with each value in the different line. Is there a way of doing this? I'm new into Access 2003 and would be great if any input is given.

Thanks.

Not sure about the "with each value in the different line" part, but to put several fields of data into one line, use a formula and the ampersand symbol (&) in a text box to concatenate the three items. If they need to be separated with spaces, commas, or anything else, you'll need to add those as well.

EXAMPLE

Let's say you want to give someone their appointment time, and you have three fields for this: appt-date, appt-time, and appt-room. The formula you would put in the text box looks like this...

="Your appointment is on " & [appt-date] & " at " & [appt-time] & " in Room "& [appt-room]

Hope this helps.

pbaldy
01-15-2010, 10:58 AM
The "different line" part can be accomplished by concatenating Chr(13) & Chr(10) into the string as well.

ashishdatta
01-21-2010, 03:42 PM
Thanks Pat and Paul for your help!
It worked :)

pbaldy
01-21-2010, 03:45 PM
No problemo, and welcome to the site by the way!