UNION of Memo contents

  • Thread starter Thread starter an
  • Start date Start date
A

an

Hello!

Please, in Text box on Form and/or Report, is possible to
make UNION strings of the Memo fields contents?

Thanks in advance.
an
 
Are you including a Memo field in a UNION query, or do you want to
concatenate (join together) the contents of two or more Memo fields?

If it's a UNION query, then change it to UNION ALL (see
http://support.microsoft.com/?id=208926)

If it's the other, you can set the ControlSource of your textbox to:
=[Memo1] & " " & [Memo2]
 
Sorry,

I have only Memo field. In Database, Record1, Record2, etc.
My question is the possibility (or impossibility) to make
UNION, not between Memo1 more Memo2, but only Memo in
Record1 and Memo in Record2.

Thanks for your replay.
an

-----Original Message-----
Are you including a Memo field in a UNION query, or do you want to
concatenate (join together) the contents of two or more Memo fields?

If it's a UNION query, then change it to UNION ALL (see
http://support.microsoft.com/?id=208926)

If it's the other, you can set the ControlSource of your textbox to:
=[Memo1] & " " & [Memo2]

--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

Hello!

Please, in Text box on Form and/or Report, is possible to
make UNION strings of the Memo fields contents?

Thanks in advance.
an


.
 
Aha! There was a third possible interpretation ... I missed that one :-)

You will need to write some code to loop through all the records in your
recordset and build up a string containing all the concatenated fields.
Something like this:

Dim db as DAO.Database
Dim rs as DAO.Recordset
Dim sText as String
Set db = CurrentDb
Set rs = db.openRecordset("Select [MemoField] from [Yourtable] Order by
[SomeSortField]")
Do Until rs.EOF
sText = sText & rs![MemoField] & " "
rs.MoveNext
Loop
rs.Close
Me.[SomeTextBox] = sText

--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand


an said:
Sorry,

I have only Memo field. In Database, Record1, Record2, etc.
My question is the possibility (or impossibility) to make
UNION, not between Memo1 more Memo2, but only Memo in
Record1 and Memo in Record2.

Thanks for your replay.
an

-----Original Message-----
Are you including a Memo field in a UNION query, or do you want to
concatenate (join together) the contents of two or more Memo fields?

If it's a UNION query, then change it to UNION ALL (see
http://support.microsoft.com/?id=208926)

If it's the other, you can set the ControlSource of your textbox to:
=[Memo1] & " " & [Memo2]

--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

Hello!

Please, in Text box on Form and/or Report, is possible to
make UNION strings of the Memo fields contents?

Thanks in advance.
an


.
 
Ok,
Many, many thanks G Mandeno.
Good luck to you!
an
-----Original Message-----
Aha! There was a third possible interpretation ... I missed that one :-)

You will need to write some code to loop through all the records in your
recordset and build up a string containing all the concatenated fields.
Something like this:

Dim db as DAO.Database
Dim rs as DAO.Recordset
Dim sText as String
Set db = CurrentDb
Set rs = db.openRecordset("Select [MemoField] from [Yourtable] Order by
[SomeSortField]")
Do Until rs.EOF
sText = sText & rs![MemoField] & " "
rs.MoveNext
Loop
rs.Close
Me.[SomeTextBox] = sText

--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand


Sorry,

I have only Memo field. In Database, Record1, Record2, etc.
My question is the possibility (or impossibility) to make
UNION, not between Memo1 more Memo2, but only Memo in
Record1 and Memo in Record2.

Thanks for your replay.
an

-----Original Message-----
Are you including a Memo field in a UNION query, or do you want to
concatenate (join together) the contents of two or more Memo fields?

If it's a UNION query, then change it to UNION ALL (see
http://support.microsoft.com/?id=208926)

If it's the other, you can set the ControlSource of
your
textbox to:
=[Memo1] & " " & [Memo2]

--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

Hello!

Please, in Text box on Form and/or Report, is
possible
to
make UNION strings of the Memo fields contents?

Thanks in advance.
an


.


.
 
Back
Top