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 #740020WSPeter_Thesiger
AskWoody LoungerWSPeter_Thesiger
AskWoody LoungerWSHansV
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
-
Flash Drive Eject Error for Still In Use
by
J9438
18 minutes ago -
Windows 11 Insider Preview build 27863 released to Canary
by
joep517
16 hours, 48 minutes ago -
Windows 11 Insider Preview build 26120.4161 (24H2) released to BETA
by
joep517
16 hours, 49 minutes ago -
AI model turns to blackmail when engineers try to take it offline
by
Cybertooth
9 hours, 33 minutes ago -
Migrate off MS365 to Apple Products
by
dmt_3904
1 hour ago -
Login screen icon
by
CWBillow
8 hours, 14 minutes ago -
AI coming to everything
by
Susan Bradley
16 hours, 59 minutes ago -
Mozilla : Pocket shuts down July 8, 2025, Fakespot shuts down on July 1, 2025
by
Alex5723
1 day, 8 hours ago -
No Screen TurnOff???
by
CWBillow
1 day, 8 hours ago -
Identify a dynamic range to then be used in another formula
by
BigDaddy07
1 day, 9 hours ago -
InfoStealer Malware Data Breach Exposed 184 Million Logins and Passwords
by
Alex5723
1 day, 20 hours ago -
How well does your browser block trackers?
by
n0ads
1 day, 7 hours ago -
You can’t handle me
by
Susan Bradley
7 hours, 15 minutes ago -
Chrome Can Now Change Your Weak Passwords for You
by
Alex5723
23 hours, 54 minutes ago -
Microsoft: Over 394,000 Windows PCs infected by Lumma malware, affects Chrome..
by
Alex5723
2 days, 8 hours ago -
Signal vs Microsoft’s Recall ; By Default, Signal Doesn’t Recall
by
Alex5723
1 day, 11 hours ago -
Internet Archive : This is where all of The Internet is stored
by
Alex5723
2 days, 8 hours ago -
iPhone 7 Plus and the iPhone 8 on Vantage list
by
Alex5723
2 days, 8 hours ago -
Lumma malware takedown
by
EyesOnWindows
1 day, 21 hours ago -
“kill switches” found in Chinese made power inverters
by
Alex5723
2 days, 17 hours ago -
Windows 11 – InControl vs pausing Windows updates
by
Kathy Stevens
2 days, 17 hours ago -
Meet Gemini in Chrome
by
Alex5723
2 days, 21 hours ago -
DuckDuckGo’s Duck.ai added GPT-4o mini
by
Alex5723
2 days, 21 hours ago -
Trump signs Take It Down Act
by
Alex5723
3 days, 5 hours ago -
Do you have a maintenance window?
by
Susan Bradley
1 day, 10 hours ago -
Freshly discovered bug in OpenPGP.js undermines whole point of encrypted comms
by
Nibbled To Death By Ducks
2 days, 7 hours ago -
Cox Communications and Charter Communications to merge
by
not so anon
3 days, 9 hours ago -
Help with WD usb driver on Windows 11
by
Tex265
20 hours, 15 minutes ago -
hibernate activation
by
e_belmont
3 days, 18 hours ago -
Red Hat Enterprise Linux 10 with AI assistant
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.