View Full Version : Nesting fields in a report


ConorS
04-22-2004, 03:51 AM
HI

To keep it simple i have a table. It has three fields.

FirstName (Textfield)
Surname (Textfield)
MainBodyText (Memo)

In each field i have the following data:

FirstName:
Mike

Surname:
Jones

MainBodyText :
Dear Mr . please find the ....


-------------------------------------------------------------------------------------------------------

I am looking to generate a report that will print out the Main Body text , but include the surname field within its MainBody text. i.e.

Report:
Dear Mr Jones. Please find the .....


Notice the inclusion of "Jones"

Is it possible for a memo field to include a reference to anotherfield within the same record. Its kinda like nesting a field within another.

Does anyone know how to do this.

Pat Hartman
04-22-2004, 06:39 AM
No, you would have to parse the field with VBA. It is better to define the titles - Mr., Miss, etc. separately with each record. That way you can concatenate the fields you need.

="Dear " & [Title] & " " & [LastName] & " " & [TheMemoField]

ConorS
04-27-2004, 04:44 AM
Does anyone have any suggestions?

Rich
04-27-2004, 04:58 AM
I thought Pat gave you one, why does it not work for you?