Does anyone know if it
![]() |
There are isolated problems with current patches, but they are well-known and documented on this site. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
-
Concatenating records (Access 2000)
Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Concatenating records (Access 2000)
- This topic has 57 replies, 6 voices, and was last updated 17 years, 1 month ago.
AuthorTopicWSAPATTO03
AskWoody LoungerOctober 10, 2003 at 12:22 pm #394851Viewing 1 reply threadAuthorReplies-
WSHansV
AskWoody LoungerOctober 10, 2003 at 1:05 pm #727136If you want to do this in a report, you can create this effect by putting a text box bound to Part Number and a text box bound to Description next to each other. Set the Hide Duplicates property of Part Number to Yes.
If you need to concatenate in a form or query, you need some VBA code. I have attached a text file with the code for a custom function Concat. You can copy the code into a standard module.
To use it, create a Totals query based on the table with the part numbers and descriptions. Add the part number, and leave the Totals option as Group By. Create a calculated fieldDescriptions: Concat(“tblSomething”, “Description”, “[Part Number] = ” & [Part Number], “Line Number”, Chr(13) & Chr(10))
where tblSomething is the name of the table.
-
WSAPATTO03
AskWoody LoungerNovember 5, 2003 at 6:40 pm #740019 -
WSHansV
AskWoody Lounger -
WSAPATTO03
AskWoody LoungerNovember 5, 2003 at 8:28 pm #740095I’ve removed the ‘Compiling Error’ snapshot picture and only included the query and the section of VB code highlighted when I ran the query. The pictures are now attached.
(the rest of the code can be seen from your original text document you sent in the lounge)
The snapshop doesn’t include the highlighted text (“Dim dbs As DAO.Database”) from line 17 of the VB. I know very little about VB, but seems like their is an
error on that line??? or maybe in my query?
Thanks,
Drew -
WSHansV
AskWoody Lounger -
WSAPATTO03
AskWoody Lounger -
WSHansV
AskWoody Lounger -
WSAPATTO03
AskWoody Lounger -
WSHansV
AskWoody LoungerNovember 10, 2003 at 1:33 pm #7419113810001000 is too large to fit in a Long Integer field, so that makes me suspect that Part Number, despite its name, is a text field. If so, you must change the third argument from
“[Part Number] = ” & [Part Number]
to
“[Part Number] = ” & Chr(34) & [Part Number] & Chr(34)
Chr(34) is the double quote “.
-
WSAPATTO03
AskWoody Lounger -
WSAPATTO03
AskWoody Lounger -
WSAPATTO03
AskWoody LoungerNovember 18, 2003 at 1:35 pm #745276Hans,
Would it be possible to change the expression and use the same code on another query?
I have a table of the following columns…
ID [Number; Long Integer]
ITEM [Text]
MFG [Text]
In this list, the MFG is the field that I would like to combine/concatenate with respect to both ID & ITEM. I’ve tried to
modify the expression that you had given me, but with my knowledge I’m not able to get it to work.
Can you help?
Thanks,
Drew -
WSHansV
AskWoody LoungerNovember 18, 2003 at 1:59 pm #745294If I understand correctly, you group on ID and ITEM, and you want to concatenate the values of MFG. It goes like this:
MFG_List: Concat(“tblSomething”, “MFG”, “[ID] = ” & [ID] & ” And [ITEM] = ” & Chr(34) & [ITEM] & Chr(34), “”, Chr(13) & Chr(10))
where tblSomething is the name of the table.
-
WSAPATTO03
AskWoody Lounger -
WSAPATTO03
AskWoody Lounger -
WSAPATTO03
AskWoody LoungerDecember 16, 2003 at 3:54 pm #758197Hi Hans,
I’m trying to use this same script for another instance but am having a problem. I have an table/qry with 2 columns; one is ID and the other is NOTES (having multiple records of notes per ID).
Below is the statement I’m using and works, but it truncates at around 250 characters? Am setting this up correctly?
NOTES: Concat(“QRY_CONCAT_DESC_NOTES”,”CONCAT”,”[PROB_ID] = ” & [PROB_ID],””,Chr(13) & Chr(10) & Chr(13) & Chr(10))Regards,
Drew -
WSAPATTO03
AskWoody LoungerDecember 16, 2003 at 3:54 pm #758198Hi Hans,
I’m trying to use this same script for another instance but am having a problem. I have an table/qry with 2 columns; one is ID and the other is NOTES (having multiple records of notes per ID).
Below is the statement I’m using and works, but it truncates at around 250 characters? Am setting this up correctly?
NOTES: Concat(“QRY_CONCAT_DESC_NOTES”,”CONCAT”,”[PROB_ID] = ” & [PROB_ID],””,Chr(13) & Chr(10) & Chr(13) & Chr(10))Regards,
Drew -
WSHansV
AskWoody Lounger -
WSHansV
AskWoody Lounger -
WSHansV
AskWoody LoungerDecember 16, 2003 at 11:09 pm #758440I could reproduce your problem earlier today. Now, on another PC, I can’t. The difference is that I’ve got the latest Jet service pack on the one I’m on now. This led me to ACC2000: Result of the Mid, the Left, or the Right Function in Query Referring to Memo Column Is Incorrect. This applies to the Concat function, since it uses Mid.
So if you want to use the Concat function for results of more than 255 bytes, you must install the latest Jet service pack. Or, you can comment out the following lines in the code if you can live with a superfluous initial separator in the result:
If strRes “” Then
strRes = Mid$(strRes, Len(aSeparator) + 1)
End If -
WSAPATTO03
AskWoody Lounger -
WSHansV
AskWoody LoungerDecember 17, 2003 at 1:32 pm #758670 -
WSHansV
AskWoody LoungerDecember 17, 2003 at 1:32 pm #758671 -
WSHansV
AskWoody Lounger -
WSAPATTO03
AskWoody Lounger -
WSAPATTO03
AskWoody Lounger -
WSAPATTO03
AskWoody LoungerJanuary 13, 2004 at 9:38 pm #767605Hans,
I was hoping the Office XP would fix my issue, but I still have the same problem (truncating the concatinated field to 254 characters).
I know very little about VB or the ‘Jet…’ service packs (?), but I don’t show under tools > references the Jet 4.0 SP6 or Jet 4.0 SP8. Is this
something I need and how do I go by getting it if so? …or do I need to do something else? Please help.Thanks,
Drew -
WSHansV
AskWoody LoungerJanuary 13, 2004 at 10:05 pm #767624Having Access 2002 in itself does not solve your problem. As I remarked in a reply higher up in this thread, I could reproduce it on a PC with Access 2002 SP-2 and Jet 4.0 SP6, but not on a PC with Access 2002 SP-2 and Jet 4.0 SP8.
MSKB article How To: Obtain the Latest Service Pack for the Microsoft Jet 4.0 Database Engine describes how to determine which version of Jet 4.0 you have. This article also contains links to download the install file for SP8.
-
WSDJLansing
AskWoody Lounger -
WSDJLansing
AskWoody Lounger -
WSAPATTO03
AskWoody LoungerFebruary 6, 2004 at 9:27 pm #780157Hans,
I just got Windows XP and Office XP installed on my machine, to which I’ve ensured that I have the JET 8.0 SP. Unfortunately I’m still having problems with it truncating. I feel like this is something that I’m doing wrong on my side I’m but not for sure, so below are the fields in my table (TBL_US_EXT_DESC) and their data types…
Part Number — Text
Description — Memo
Line Number — TextThe query I set up only includes the above table, with Part Number being the only field that is grouped on. The Concat statement that I’m using is the following…
Long Desc: Concat(“TBL_US_EXT_DESC”,”Description”,”[Part Number] = ” & Chr(34) & [Part Number] & Chr(34),”Line Number”,Chr(13) & Chr(10))
Total = ExpressionDoes everything look right? I’m at a loss on what else I can do to possibly fix this problem?
Any help is greatly appreciated.Thanks,
Drew -
WSHansV
AskWoody LoungerFebruary 6, 2004 at 11:01 pm #780200Your expression looks OK. I created a test table with the same name and fields, and also a query with the design you describe; I copied the definition of Long Desc straight out of your post into the query design. On my PC with Jet 4.0 SP-8, the query works as intended: the Long Desc field is not truncated. So you can rest assured that you didn’t make a mistake in the design. But, sadly, I have no idea why it doesn’t work for you, or what you could do to fix it…
-
WSAPATTO03
AskWoody LoungerFebruary 9, 2004 at 9:51 pm #781553Hans/Wendell,
I did check and did already have SP8 installed, but to ensure I went ahead downloaded and ran the file, which didn’t change anything.
I don’t know why I didn’t think of this earlier, but one thing I didn’t try was setting up a separate table and trying this from scratch. Once I done this, the field was no longer truncated. Something must of happen with my original table????? I’ll just have to copy the text over to the new table.
Thanks for all the help!!!Regards,
Drew -
WSAPATTO03
AskWoody LoungerFebruary 9, 2004 at 9:51 pm #781554Hans/Wendell,
I did check and did already have SP8 installed, but to ensure I went ahead downloaded and ran the file, which didn’t change anything.
I don’t know why I didn’t think of this earlier, but one thing I didn’t try was setting up a separate table and trying this from scratch. Once I done this, the field was no longer truncated. Something must of happen with my original table????? I’ll just have to copy the text over to the new table.
Thanks for all the help!!!Regards,
Drew -
Jmacleod
AskWoody LoungerApril 7, 2008 at 5:40 pm #1104836Hi,
I too was having a problem with truncation of the crosstab at 255 characters. I solved it like this:I created a table with the three fields that were needed for the crosstab query, & I made the Concatenated field in the table a memo field.
Ran a Group by append query, that appended to the table that I’d just created & then run a crosstab query from that Table, voila, the 255 truncation diappeared.Jim MacLeod
-
WSHansV
AskWoody LoungerFebruary 6, 2004 at 11:01 pm #780201Your expression looks OK. I created a test table with the same name and fields, and also a query with the design you describe; I copied the definition of Long Desc straight out of your post into the query design. On my PC with Jet 4.0 SP-8, the query works as intended: the Long Desc field is not truncated. So you can rest assured that you didn’t make a mistake in the design. But, sadly, I have no idea why it doesn’t work for you, or what you could do to fix it…
-
WBell
AskWoody_MVP -
WBell
AskWoody_MVP -
WSAPATTO03
AskWoody LoungerFebruary 6, 2004 at 9:27 pm #780158Hans,
I just got Windows XP and Office XP installed on my machine, to which I’ve ensured that I have the JET 8.0 SP. Unfortunately I’m still having problems with it truncating. I feel like this is something that I’m doing wrong on my side I’m but not for sure, so below are the fields in my table (TBL_US_EXT_DESC) and their data types…
Part Number — Text
Description — Memo
Line Number — TextThe query I set up only includes the above table, with Part Number being the only field that is grouped on. The Concat statement that I’m using is the following…
Long Desc: Concat(“TBL_US_EXT_DESC”,”Description”,”[Part Number] = ” & Chr(34) & [Part Number] & Chr(34),”Line Number”,Chr(13) & Chr(10))
Total = ExpressionDoes everything look right? I’m at a loss on what else I can do to possibly fix this problem?
Any help is greatly appreciated.Thanks,
Drew -
WSHansV
AskWoody LoungerJanuary 13, 2004 at 10:05 pm #767625Having Access 2002 in itself does not solve your problem. As I remarked in a reply higher up in this thread, I could reproduce it on a PC with Access 2002 SP-2 and Jet 4.0 SP6, but not on a PC with Access 2002 SP-2 and Jet 4.0 SP8.
MSKB article How To: Obtain the Latest Service Pack for the Microsoft Jet 4.0 Database Engine describes how to determine which version of Jet 4.0 you have. This article also contains links to download the install file for SP8.
-
WSAPATTO03
AskWoody LoungerJanuary 13, 2004 at 9:38 pm #767606Hans,
I was hoping the Office XP would fix my issue, but I still have the same problem (truncating the concatinated field to 254 characters).
I know very little about VB or the ‘Jet…’ service packs (?), but I don’t show under tools > references the Jet 4.0 SP6 or Jet 4.0 SP8. Is this
something I need and how do I go by getting it if so? …or do I need to do something else? Please help.Thanks,
Drew -
WSHansV
AskWoody Lounger -
WSAPATTO03
AskWoody Lounger -
WSHansV
AskWoody LoungerDecember 16, 2003 at 11:09 pm #758441I could reproduce your problem earlier today. Now, on another PC, I can’t. The difference is that I’ve got the latest Jet service pack on the one I’m on now. This led me to ACC2000: Result of the Mid, the Left, or the Right Function in Query Referring to Memo Column Is Incorrect. This applies to the Concat function, since it uses Mid.
So if you want to use the Concat function for results of more than 255 bytes, you must install the latest Jet service pack. Or, you can comment out the following lines in the code if you can live with a superfluous initial separator in the result:
If strRes “” Then
strRes = Mid$(strRes, Len(aSeparator) + 1)
End If -
WSHansV
AskWoody LoungerNovember 18, 2003 at 1:59 pm #745295If I understand correctly, you group on ID and ITEM, and you want to concatenate the values of MFG. It goes like this:
MFG_List: Concat(“tblSomething”, “MFG”, “[ID] = ” & [ID] & ” And [ITEM] = ” & Chr(34) & [ITEM] & Chr(34), “”, Chr(13) & Chr(10))
where tblSomething is the name of the table.
-
WSAPATTO03
AskWoody LoungerNovember 18, 2003 at 1:35 pm #745277Hans,
Would it be possible to change the expression and use the same code on another query?
I have a table of the following columns…
ID [Number; Long Integer]
ITEM [Text]
MFG [Text]
In this list, the MFG is the field that I would like to combine/concatenate with respect to both ID & ITEM. I’ve tried to
modify the expression that you had given me, but with my knowledge I’m not able to get it to work.
Can you help?
Thanks,
Drew -
WSHansV
AskWoody LoungerNovember 10, 2003 at 1:33 pm #7419123810001000 is too large to fit in a Long Integer field, so that makes me suspect that Part Number, despite its name, is a text field. If so, you must change the third argument from
“[Part Number] = ” & [Part Number]
to
“[Part Number] = ” & Chr(34) & [Part Number] & Chr(34)
Chr(34) is the double quote “.
-
WSAPATTO03
AskWoody Lounger -
WSHansV
AskWoody Lounger -
WSAPATTO03
AskWoody Lounger -
WSHansV
AskWoody Lounger
-
-
WSAPATTO03
AskWoody LoungerNovember 5, 2003 at 8:28 pm #740096I’ve removed the ‘Compiling Error’ snapshot picture and only included the query and the section of VB code highlighted when I ran the query. The pictures are now attached.
(the rest of the code can be seen from your original text document you sent in the lounge)
The snapshop doesn’t include the highlighted text (“Dim dbs As DAO.Database”) from line 17 of the VB. I know very little about VB, but seems like their is an
error on that line??? or maybe in my query?
Thanks,
Drew
-
-
WSHansV
AskWoody Lounger
-
-
WSAPATTO03
AskWoody LoungerNovember 5, 2003 at 6:40 pm #740020 -
WSPeter_Thesiger
AskWoody Lounger -
WSPeter_Thesiger
AskWoody Lounger
-
-
WSHansV
AskWoody LoungerOctober 10, 2003 at 1:05 pm #727137If you want to do this in a report, you can create this effect by putting a text box bound to Part Number and a text box bound to Description next to each other. Set the Hide Duplicates property of Part Number to Yes.
If you need to concatenate in a form or query, you need some VBA code. I have attached a text file with the code for a custom function Concat. You can copy the code into a standard module.
To use it, create a Totals query based on the table with the part numbers and descriptions. Add the part number, and leave the Totals option as Group By. Create a calculated fieldDescriptions: Concat(“tblSomething”, “Description”, “[Part Number] = ” & [Part Number], “Line Number”, Chr(13) & Chr(10))
where tblSomething is the name of the table.
Viewing 1 reply thread -

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
Windows hosting exposes additional bugs
by
Susan Bradley
2 hours, 35 minutes ago -
No more rounded corners??
by
CWBillow
5 hours ago -
Android 15 and IPV6
by
Win7and10
3 hours, 41 minutes ago -
KB5058405 might fail to install with recovery error 0xc0000098 in ACPI.sys
by
Susan Bradley
14 hours, 56 minutes ago -
T-Mobile’s T-Life App has a “Screen Recording Tool” Turned on
by
Alex5723
17 hours, 38 minutes ago -
Windows 11 Insider Preview Build 26100.4202 (24H2) released to Release Preview
by
joep517
12 hours, 13 minutes ago -
Windows Update orchestration platform to update all software
by
Alex5723
1 day ago -
May preview updates
by
Susan Bradley
12 hours, 21 minutes ago -
Microsoft releases KB5061977 Windows 11 24H2, Server 2025 emergency out of band
by
Alex5723
3 hours, 56 minutes ago -
Just got this pop-up page while browsing
by
Alex5723
17 hours, 9 minutes ago -
KB5058379 / KB 5061768 Failures
by
crown
14 hours, 13 minutes ago -
Windows 10 23H2 Good to Update to ?
by
jkitc
3 hours, 33 minutes ago -
At last – installation of 24H2
by
Botswana12
1 day, 16 hours ago -
MS-DEFCON 4: As good as it gets
by
Susan Bradley
3 hours, 31 minutes ago -
RyTuneX optimize Windows 10/11 tool
by
Alex5723
2 days, 4 hours ago -
Can I just update from Win11 22H2 to 23H2?
by
Dave Easley
3 hours, 7 minutes ago -
Limited account permission error related to Windows Update
by
gtd12345
2 days, 18 hours ago -
Another test post
by
gtd12345
2 days, 18 hours ago -
Connect to someone else computer
by
wadeer
2 days, 12 hours ago -
Limit on User names?
by
CWBillow
2 days, 15 hours ago -
Choose the right apps for traveling
by
Peter Deegan
2 days, 5 hours ago -
BitLocker rears its head
by
Susan Bradley
1 day, 13 hours ago -
Who are you? (2025 edition)
by
Will Fastie
1 day, 12 hours ago -
AskWoody at the computer museum, round two
by
Will Fastie
2 days, 8 hours ago -
A smarter, simpler Firefox address bar
by
Alex5723
3 days, 4 hours ago -
Woody
by
Scott
3 days, 14 hours ago -
24H2 has suppressed my favoured spider
by
Davidhs
1 day, 13 hours ago -
GeForce RTX 5060 in certain motherboards could experience blank screens
by
Alex5723
4 days, 4 hours ago -
MS Office 365 Home on MAC
by
MickIver
3 days, 22 hours ago -
Google’s Veo3 video generator. Before you ask: yes, everything is AI here
by
Alex5723
4 days, 18 hours ago
Recent blog posts
Key Links
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.