By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,847 Members | 3,102 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,847 IT Pros & Developers. It's quick & easy.

grouping memo fields

P: n/a
Hi guys,
My table has a memo field. At the end of the month a run
a report and I would like to concatenate the memo fields in a unique
field by
dept. Im thinking doing this through totals button , but in the
combobox
there are only max,min,sum,.. There is no concatenate function.
Im avoinding doing that using VBA.

Somebody help me please.
Maffonso

May 26 '06 #1
Share this Question
Share on Google+
7 Replies


P: n/a
You are going to have to do _something_ more than wish for a simple macro
solution.

Just offhand, using VBA in the OnPrint event of Detail records, to
concatenate ("&" is the concatenation operator, with "+" also working if
there are no Null Memo Fields) is the simplest approach, and then moving the
contents of the variable where you concatenated into a Text Box in the
OnPrint event of the Group Footer for the department.

Larry Linson
Microsoft Access MVP

"maffonso" <mm*******@gmail.com> wrote in message
news:11**********************@i40g2000cwc.googlegr oups.com...
Hi guys,
My table has a memo field. At the end of the month a run
a report and I would like to concatenate the memo fields in a unique
field by
dept. Im thinking doing this through totals button , but in the
combobox
there are only max,min,sum,.. There is no concatenate function.
Im avoinding doing that using VBA.

Somebody help me please.
Maffonso

May 27 '06 #2

P: n/a
Just for starters, it sounds like you really are trying to group on Memo
fields. You can't.

You can concatenate; you can extract some number of characters from the left,
middle, or right; you can even move every word in the memo field to an array
in one line of code. But you can't group on Memo fields.

Can you say a bit more about what you're trying to accomplish? Memo fields
are for holding large amounts of text. (Limit=32K characters). There is
nothing you would normally put in a Memo field that would merit or encourage
grouping.

On 5/26/2006 2:10:10 PM, "maffonso" wrote:
Hi guys,
My table has a memo field. At the end of the month a run
a report and I would like to concatenate the memo fields in a unique
field by
dept. Im thinking doing this through totals button , but in the
combobox
there are only max,min,sum,.. There is no concatenate function.
Im avoinding doing that using VBA.

Somebody help me please.
Maffonso

--
Science is organized common sense where many a beautiful theory is killed by an ugly fact (Thomas Huxley).
May 27 '06 #3

P: n/a
Hi guys,
My table is month,dept, comment.
A have to do a report by dept , doesnt matter month.
Most of the comments are about 400 characters (that discards text
field).
First question: Are there a type between text and memo?
Pehaps I could use textfield and limit the lenght of the comment to 255
but users could complain.My boss would love it.
Larry, could you explain better how to concatenate the memos using &.
Like this: txtComment = txtComent & memoField ?? Is that Ok?

Thank you all.

May 27 '06 #4

P: n/a
"maffonso" <mm*******@gmail.com> wrote in
news:11**********************@u72g2000cwu.googlegr oups.com:
Hi guys,
My table is month,dept, comment.
A have to do a report by dept , doesnt matter month.
Most of the comments are about 400 characters (that discards
text field).
First question: Are there a type between text and memo?
Pehaps I could use textfield and limit the lenght of the
comment to 255
but users could complain.My boss would love it.
Larry, could you explain better how to concatenate the memos
using &. Like this: txtComment = txtComent & memoField ?? Is
that Ok?

Thank you all.


Insead of trying to concatenate the memo fields, build your
report using the summary query, and add a subreport that
contains only the memo fields for the department and a hidden
field that contains the department name..

--
Bob Quintal

PA is y I've altered my email address.
May 27 '06 #5

P: n/a
"maffonso" <mm*******@gmail.com> wrote
Larry, could you explain better how
to concatenate the memos using &.
Like this: txtComment = txtComent & memoField
?? Is that Ok?


That would depend on where you were doing the concatenation and the details
of the situation.

Dim strSomeComment as String
Dim strSomeMemo as String
. . .
strSomeComment = strSomeComment & strSomeMemo

would be OK. If the memo data to be concatenated is in a Field in a Record
read with DAO or ADO, or if it is in a Control displayed on a Form, or if it
is a Field in the Form's RecordSource but not displayed in a Control, then
the notation would be different.

Larry Linson
Microsoft Access MVP
May 28 '06 #6

P: n/a
"Larry Linson" <bo*****@localhost.not> wrote in
news:E2leg.2639$As2.1511@trnddc02:
"maffonso" <mm*******@gmail.com> wrote
Larry, could you explain better how
to concatenate the memos using &.
Like this: txtComment = txtComent & memoField
?? Is that Ok?


That would depend on where you were doing the concatenation and
the details of the situation.

Dim strSomeComment as String
Dim strSomeMemo as String
. . .
strSomeComment = strSomeComment & strSomeMemo

would be OK. If the memo data to be concatenated is in a Field in
a Record read with DAO or ADO, or if it is in a Control displayed
on a Form, or if it is a Field in the Form's RecordSource but not
displayed in a Control, then the notation would be different.


But then you might run into the DAO memo concatenation problem,
which causes the result to be gibberish atfer the 255th character.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
May 29 '06 #7

P: n/a
I still don't see what you're need to concatenate.

If you have a field that denotes the Dept, you can restrict data by that
field and print all the records for a single department (showing all months)
or for a single month (showing all departments) or any combination.

Is it maybe enough just to restrict what you're printing, and then you don't
actually have to concatenate these memo fields?
May 30 '06 #8

This discussion thread is closed

Replies have been disabled for this discussion.