Does anyone know if it
![]() |
Patch reliability is unclear. Unless you have an immediate, pressing need to install a specific patch, don't do it. |
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
-
Auto Time Zone Adjustment
by
wadeer
1 hour, 20 minutes ago -
To download Win 11 Pro 23H2 ISO.
by
Eddieloh
6 hours, 33 minutes ago -
Manage your browsing experience with Edge
by
Mary Branscombe
7 hours, 11 minutes ago -
Fewer vulnerabilities, larger updates
by
Susan Bradley
1 hour, 5 minutes ago -
Hobbies — There’s free software for that!
by
Deanna McElveen
3 hours, 22 minutes ago -
Apps included with macOS
by
Will Fastie
2 hours, 16 minutes ago -
Xfinity home internet
by
MrJimPhelps
12 hours, 3 minutes ago -
Convert PowerPoint presentation to Impress
by
RetiredGeek
16 minutes ago -
Debian 12.11 released
by
Alex5723
22 hours, 29 minutes ago -
Microsoft: Troubleshoot problems updating Windows
by
Alex5723
1 day, 2 hours ago -
Woman Files for Divorce After ChatGPT “Reads” Husband’s Coffee Cup
by
Alex5723
5 hours, 36 minutes ago -
Moving fwd, Win 11 Pro,, which is best? Lenovo refurb
by
Deo
22 hours, 38 minutes ago -
DBOS Advanced Network Analysis
by
Kathy Stevens
1 day, 19 hours ago -
Microsoft Edge Launching Automatically?
by
healeyinpa
1 day, 9 hours ago -
Google Chrome to block admin-level browser launches for better security
by
Alex5723
1 day, 21 hours ago -
iPhone SE2 Stolen Device Protection
by
Rick Corbett
1 day, 14 hours ago -
Some advice for managing my wireless internet gateway
by
LHiggins
21 hours, 34 minutes ago -
NO POWER IN KEYBOARD OR MOUSE
by
HE48AEEXX77WEN4Edbtm
14 hours, 26 minutes ago -
A CVE-MITRE-CISA-CNA Extravaganza
by
Nibbled To Death By Ducks
2 days, 7 hours ago -
Sometimes I wonder about these bots
by
Susan Bradley
2 days, 3 hours ago -
Does windows update component store “self heal”?
by
Mike Cross
1 day, 17 hours ago -
Windows 11 Insider Preview build 27858 released to Canary
by
joep517
2 days, 21 hours ago -
Pwn2Own Berlin 2025: Day One Results
by
Alex5723
1 day, 5 hours ago -
Windows 10 might repeatedly display the BitLocker recovery screen at startup
by
Susan Bradley
17 hours, 48 minutes ago -
Windows 11 Insider Preview Build 22631.5409 (23H2) released to Release Preview
by
joep517
2 days, 23 hours ago -
Windows 10 Build 19045.5912 (22H2) to Release Preview Channel
by
joep517
2 days, 23 hours ago -
Kevin Beaumont on Microsoft Recall
by
Susan Bradley
2 days, 12 hours ago -
The Surface Laptop Studio 2 is no longer being manufactured
by
Alex5723
3 days, 8 hours ago -
0Patch, where to begin
by
cassel23
3 days, 2 hours ago -
CFPB Quietly Kills Rule to Shield Americans From Data Brokers
by
Alex5723
3 days, 21 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.