I have a database where I have 10 fields of information I want to combine. Is there anyway can copy all 10 fields into a new db all of it going into 1 field?
I am using MS Access 97.
![]() |
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 |
Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » combine 10 fields into 1.
You should be able to use an append or make table query to concatenate your 10 fields into one. But I would have to ask why you want to store more than one value in a field? Example of concatenation expression.
[FieldName] & ” ” & [FieldName] & ” ” & [FieldName] & ” ” & [FieldName] & ” ” & [FieldName] etc.
I hate working on someone else’s projects. Started to try this out but I ran into a problem. I didn’t notice but the fields they created are check boxes.
So let me rephrase it. How can I combine 10 fields with check box’s into a field that will have text data? If PCLAN is checked how could I have it say PCLAN (or something like it) in the new db?
Might be better to trash it and start over.
Don’t trash it yet! This looks like a series of IIF statements could save your day.
Set up a query to analyze your existing table, using something like this:
IIF([Tablename]![PCLAN]=TRUE,”PCLAN”,””)
Do this for each of the 10 fields in your [Tablename]. Then concatenate the ten results and export to your new table.
The check boxes in your original table equate to “TRUE” if checked, or “FALSE” if unchecked. This allows the IIF function to evaluate whether the box is checked or not. If the box is checked, the formula will then return the “#text#” entered (“PCLAN” in the previous example), or an empty string (“”) if the box is not checked.
The formula is entered in the “Field:” cell in the query design template; it is not a criteria.
Concatenating is just a fancy word for stringing together the values from a number of different fields into one field. You would do this using a formula such as:
Field1&”, “&Field2&”, “&Field3″…
This will give you the values calculated by your IIF statements as a single value, with each portion separated by a comma and space.
I am trying to combine this information into a new field. In the Expression Builder I can use this line.
Expr1: IIf([dbPCon]![mfdisk]=True,”Mainframe to Disk”)
But if I try to add a second or so forth I can get it to work. I also tried:
Expr1: IIf([dbPCon]![mfdisk]=True,”Mainframe to Disk”)and IIf([dbPCon]![PCMF]=True,”PC to Mainframe”)
and
Expr1: IIf([dbPCon]![mfdisk]=True,”Mainframe to Disk”)or IIf([dbPCon]![PCMF]=True,”PC to Mainframe”)
None seem to work.
You need to add a value for IIF to report if the condition is not true. The IIF() function requires three parts:
IIF(Condition,Value_if_True,Value_if_False).
Next, develop your conversion in layers. It would be simpler if you evaluated each field separately, and then combined the results generated. The first layer is your source data ([dbPCon]). The second layer (query #1) is converting your check boxes to text values, using a separate IIF statement for each field. The third layer (query #2) is combining the results of the second layer into one field.
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.
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.
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.
Notifications