Combine Multiple Records' Field Value Into One Field?

Nov 7, 2006

Let's say I have two tables:

Product.
Item Description
A It's Red
B It's Blue
C It's Green
D You'll love it

Category.
Item Category_name
A Cat1
A Cat2
A Cat3
B Cat1
B Cat4
C Cat1
C Cat6

I want to create a query/table that takes all the possible values for Category.Item and mix them into one field seperated by say a comma, so it would look like this:

ItemCategoryConsolodation.
Item Desc Categories
A It's Red Cat1,Cat2,Cat3
B It's Blue Cat1,Cat4
...


How does one do that?!

What's it called when you try to do this so I can Google it?

I've looked through like 8 Access books at the book store and none of them address anything like this. Can someone recommend a book that would cover "weird" stuff like this?

View Replies


ADVERTISEMENT

Combine Multiple Rows Into One Field?

Mar 28, 2008

Hello,

I am trying to find a way to combine multiple rows into one (field). I have 2 tables. One table is data the other table is notes. The notes table has a new record created for each new note. Both tables have the Account Number and and Sub Account Number. I am linking the two tables on these account numbers with a left join normally. There can be records in the data table and no records in the notes table. I guess what I want is a query or sql statement i can use in vba that will display all the data from the data table and all the notes from the notes table in on field.

This data is used in a large report. Right now I have the data table set to the report by itself and code on the report to pull the notes from the notes table using a ADO recordset with a do while that just adds each note to a single variable. This works fine and does the job. The only problem is the time it takes to run the report now. If the report has 1000 records with notes on 90% of them and each of those has multiple notes that recordset code has to run thu ALOT. I use to have all the notes just compile to one field in the data table and the report ran very fast that way. I had to change this since I need it this way as to filter notes by time and archive them after a period.

I have read thru so many posts and see lots of code functions to do this but its just the same thing I already have with the recordset code building the combined field. Any other way to do what I am trying? I think I have just been over thinking this stuff at this point an maybe a fresh set of eyes will help. Below are some simple table layouts for the 2.

**Account Number and Sub ID fields in both tables are not unquie.

Data Table: (this table has alot more data but this gives you the idea.)
Account_NUM - Sub_ID - Data1
1234 | 3 | 123 N Inc.
1234 | 3 | 666 DRN
4567 | 4 | 543 S Way.
7890 | 5 | zzz ABC

Notes Table: (Yes the notes field is a MEMO field)
Account_Num - Sub_ID - Notes
1234 | 3 | notes1
1234 | 3 | notes2
1234 | 3 | notes3


The output I am trying to Get:
Account_Num - Sub_ID - Data1 - Notes
1234 | 3 | 123 N Inc. | notes1 notes2 notes3
1234 | 3 | 666 DRN | notes1 notes2 notes3
4567 | 4 | 543 S Way. | NULL
7890 | 5 | zzz ABC | NULL

Thank you for any advice or thoughts.

Joe

View 2 Replies View Related

Combine Multiple Input Boxes Into One Field

Jun 18, 2006

Hey all,
I'm wondering if creating something like this is too difficult, or where I'd start? (see image attached). Here's kind of the process:
Scenario 1 :
1) user selects value from combobox
2) clicks text link ("add") to add value to table
3) value is displayed on form, with "remove" link that can take previously written data out of table
4) combo refreshes, moves down and process can repeat

The values would be added to the table seperated by commas.

Scenario 2:
This might be too difficult, in which case I could just use four or so text inputs and the user could type in the values... all written to different table cells. In this case, I'd need to show be able to write all the cells to a single textbox string on a form in the format "cast member 1, cast member 2" etc.

Anyone know what I'm trying to do and that could lend some advice? If there's an easier way to do this, please let me know. haha, thank yoU!

View 10 Replies View Related

General :: Form Control To Combine Multiple Field Values Into A Single Text Box?

May 10, 2013

I'm trying to set the control source for a control on my report that describes the number of portions that goes into a box. Sometimes there is a specific number of portions per box and sometimes it's a range. When the number of units is specific, then it is entered into the MasterCaseMinUnits Field. If there is a range of units possible than the min is entered into MasterCaseMinUnits and the max is entered into the MasterCaseMaxUnits.

I want my report to look at the mastercasemaxunits, if it is blank it will only display what is in the MasterCaseMinUnits field. If there is a value in the masterCasemaxUnits field, then it will display the masterCaseMinUnits & " - " & MasterCaseMaxUnits. this is the code I'm Using:

Code:

=IIf(Nz([MasterCasemaxUnits],[MasterCaseMinUnits])=[MasterCaseMinUnits],[MasterCaseMinUnits],[MasterCaseMinUnits] & " - " & [MasterCaseMaxUnits])

When I run my report, the control displays: #Type!

View 2 Replies View Related

Combine / Concatenate Multiple Values In Different Records That Have Same ID

Mar 13, 2012

I have to concatenate the data in multiple records into one record. They have "skus" associated with them.

I have two columns.

ColumnSku: Which contains a product sku
ColumnModel: Which contains a model numbers

ColumnSku can contain the same sku hundreds of times
ColumnModel can contain the same model several times but not for the same sku

What I need to do is this: For every time a sku is shown in ColumnSku, take the model in ColumnModel and join them together separated by a comma.

For example

ColumnSku|ColumnModel
SKU1111|Model11111
SKU1111|Model22222
SKU1111|Model33333
SKU1111|Model44444
SKU1111|Model55555
SKU9999|ModelHHHHH
SKU9999|ModelJJJJJ
SKU9999|ModelMMMMM

Would end up like this
ColumnSku|ColumnModel
SKU1111|Model11111,Model22222,Model33333,Model44444,Model5 5555
SKU9999|ModelHHHHH,ModelJJJJJ,ModelMMMMM

How do I do this?

View 1 Replies View Related

Creating Multiple Records From One Field

Dec 17, 2004

Hi all,

I was wondering if anyone had code to split a field by semicolums, to create multiple records.The field has the first line of address for each property with a particular postcode.
For instance

field name:
PRMF
Craven House; Ample Mansion; WHSmith; Bulevard Terrace.

I want to be able to split fields like the one above with these properties by the semicolums so they become seperate records, but share the same other fields e.g. postcode, city...

Thanks in advance,

M-.

View 5 Replies View Related

Creating Multiple Records From One Field 2

Dec 21, 2004

Hi,

still not sure how to split one field therby creating multiple records from it.
For instance:
split field:
PRMF
Craven House; Ample Mansion; WHSmith; Bulevard Terrace.

to

PRMF
Craven House
Ample Mansion
WHSmith
Bulevard Terrace.

I have made it a little clearer on the attached word doc.

The plan is to prompt the user to enter a postcode, then based on postcode an sql statement splits the fields of the field metioned with the criteria on a query. Any help very much appreciated, Thanks in advance.

M-.

View 2 Replies View Related

Is There A Way To Combine Different Values For A Field?

Apr 10, 2007

Hi all,Is there a Way to Combine Different Values in a field as a ONE value field?Any suggestions are appreciated.Thanks in advance.

View 8 Replies View Related

Populate Multiple Records With Same Data In Same Field?

Dec 15, 2006

Howdy.....I'd like to know if there is a way to populate the same field
in several hundred records with the same text value instead of typing into each field in datasheet or form view. Macro?

Thanks for your support!

bugleboy

View 2 Replies View Related

Listing All Records For Same Field In Multiple Tables

Oct 27, 2006

Hi,

I want to list all the records of a particular field from all tables in my database. The field has the same name in all the tables. Ideally I would like one long list of the records. How can I do this?

Thanks,

Richard

View 6 Replies View Related

Concatentate A Single Field From Multiple Records

Nov 17, 2006

I have a table of every reading of every electric meter. This history goes back a couple of years.

Field1 = date
Field2 = Meter#
Field3 = Single digit code identifying method of reading

The same meter is read multiple times in a year. The number of readings in the database is 1 or more (no limit).

I want to create a single line of text in 1 field that shows a history of the reading method of a particular meter.

Reading method translations
A=Radio Frequency
B=Manual
C=Not Read
X=Estimated


Here's a sample of what I would like to see .....

View 4 Replies View Related

Concatenate Multiple Records Into Memo Field

Mar 9, 2007

Hi All,

I can use some help with a jumping off poit.

*Please see attached file*

I have 2 tables tblSFDC and tblTheCall

tblSFDC (contact information) includes CustID (primary key) and a memo field "Notes"

tblTheCall (call information) includes CustID (relates to tblSFDC) and "activity data fields" ie "Live", Left Message" , Sent email".

tblTheCall may in some cases have multiple records for each CustID

I need to :
Concatenate from tblTheCall Field Names and field values (that are not null)
Insert into tblSFDC.Notes
Where tblTheCall.CustID = tblSFDC.CustID

*Please see attached file*
TIA
Detrie

View 8 Replies View Related

Collate Field Content From Multiple Records

Jul 15, 2007

I have a database with company records in one table and calls made to companies in another table; the two tables properly related on a CompanyID field. A query joining the tables returns a dataset with multiple instances of CompanyID's because each company may have received 0 - n calls.

I would like to collate the content of the 0 - n[/I] callnotes records for each company into a single 'CollectedNotes' entity. I have two questions please.

Can anyone think of a way to do this without using code?

If not, can anyone give me a helping hand with the code?

In pseudo-code terms, I anticipate something like accessing the recordset for CompanyID's related to CallID's looping through to write the content of each instance of a CallNote (identified by unique CallID) to a new 'CollectedNotes' object. Help gratefully received. Thanks. MITW

View 3 Replies View Related

Adding Multiple Records For A Field In A Form

Nov 18, 2004

Hi forum, I have this database with a main form and 5 subfoms. For the Address Subform, I need to add multiple addresses for each person I add. How we currently do it is enter the multiple addresses per person, one at a time. Is there an easier way to do this.

For eg: Id Last Name First Name

Then Address 1
Address 2
Address 3

View 1 Replies View Related

Queries :: Merging Data In One Field From Multiple Records

Jul 30, 2015

I am linking to an SQL database that is designed in such a way that the problem description is recorded in multiple records. See a simplified example below. I want to run a query that will merge the information in the PROBLEM_DESCRIPTION and return only one record for PROB_ID 55678.

PROB_ID ORIGINATOR DATE PROBLEM_DESCRIPTION
55678 Jim 01/01/2015 While cleaning my computer, I noticed
55678 Jim 01/01/2015 the screen was cracked. I called
55678 Jim 01/01/2015 the IT department and they said I had
55678 Jim 01/01/2015 to write a work order. However it
55678 Jim 01/01/2015 was rejected without reason.

View 7 Replies View Related

Modules & VBA :: Return Multiple Records In A Single Field

Apr 6, 2014

I'm trying to create a report that's based on a query, and the query has three fields: [PersonName], [PersonDate], [PersonShift]. This table holds records for people that worked on certain days and certain shifts. What I want to do is create a report that gives a graphical calendar display of each day in a month, and on any day that the person has a record (and sometimes there are more than one), I'd like to see just the PersonShift records showing in that day's box.

tblPersons
PersonName PersonDate PersonShift
Jason 4/10/14 FIRST
Jason 4/13/14 FIRST
Jason 4/13/14 SECOND

So if I were to print this report for Jason, I'd get all the days in April laid out like a calendar, and on 4/10/14 you'd see "FIRST" in the box, and on 4/13/14. you'd see FIRST and SECOND in the box. All the other boxes would be blank.how to display the calendar, how to display the dates. I'm able to return records to those boxes by creating 31 separate queries, one for each day of the month, and each query returns records for that day. The queries are added to the report as subreports. It all works beautifully.

The thing is, I'm running 31 queries every time I pull the report. Is there a way to code a single field on a report that will run a SELECT statement on the table using variables that are located in fields elsewhere in the record?

If I have a PersonName field on the header of the report, and I have a PersonDate field in the detail of the report's record, can I create a new field in the detail of that record that runs a SELECT statement on qryPersons, and filters the tblPersons by the PersonName on the header of the report and on PersonDate in the record?

I want a field on a report that runs a SELECT statement on tblPersons, I want the field to return only the PersonShift records for that person based upon the PersonDate. Each of the fields on my report have a CalendarDate field, and I want the SELECT statement to return records where the PersonDate matches the CalendarDate, and again, it should only display PersonShift records.

View 2 Replies View Related

Combine Two Text Fields Into New Field?

Aug 20, 2004

Hi,
I am trying to combine 2 text fields into a new field (concatenate) so that I can use it as the primary field.
Can anyone pls help.

View 3 Replies View Related

General :: How To Combine 3 Field Into 1 In Query

Nov 20, 2014

how to combine 3 field into 1. For instance. I have a customer table with company name, branch, floor, department. then i am gonna create a query called customerextended and combine all these 3 field so that I can select them in the combobox.

I have a sample here but I just dont know how to edit it...

"Company name: IIf(IsNull([department]),IIf(IsNull([companyname]),[floor],[companyname]),IIf(IsNull([companyname]),[department],[companyname] & " " & [department]))"

View 4 Replies View Related

Display Text From One Memo Field And Multiple Records In A Report

Apr 10, 2008

I have an Access database where we grade reports. At the end of the grading form I have a memo field [Comments] for the grader to enter comments about why the report received the grade [Grade]. Each report is graded by multiple people. So for example, ReportNum 08-001 may be graded by 5 people and therefore will have 5 records in the database. I need a report to show all the comments for all the reports where the grade is <80. I know how to do this except for how to display all the comments from the memo field in the 5 records on one report for that ReportNum.

I hope I am making sense. I appreciate any help.

Jim

View 2 Replies View Related

Tables :: Copy And Paste Text Field To Multiple Records

Aug 10, 2015

I have been unable to find a simple way to copy a text entry from a Table Field and paste it to multiple records in Datasheet view.The Toolbar 'Paste' procedure copies to the selected record only and I am unaware of how to select multiple records, as per a spreadsheet procedure.

View 2 Replies View Related

Reports :: Combine A Text And Memo Field

May 10, 2013

I am having trouble creating a specifically formatted report.

Anyway, I have two fields: [Title] (plain text) and [Description] (memo). I want to combine the two but have the Title bold underlined but not the Description. I want it to look like this:

This is the Title. And this is the decription part that could go on for many, many more lines...

I have tried combining the two fields like: =[Title] & [Description] but if I set the properly to underline, then the whole thing is underlined.

Since the Title will vary in length, I cannot just underline the Title and then put the Description field next to it.

View 6 Replies View Related

Reports :: Combine Text Box With Value From A Field In Table

Aug 13, 2013

I have a problem when I try to combine in a text box a text and value from field in a table.

I would like to have a text like this:

Ref nr: 1

"Ref nr" would be a text in a report
"1" would be the nr of the ID of the client.

I tried:

="Ref nr " & [ID]

It simply does not work. No clue where I go wrong.

View 1 Replies View Related

General :: How To Combine Four Fields Into One Field In Same Record

Jul 9, 2014

Using Windows 7,
Access 2010.

Is there a way to combine four fields into one field in the same record? I am trying to build Equipment Code field by using the abbreviated values of Category, Item, Type and Dimension fields.

Example: if Category=Storage System (SS), Item=Wire Deck (WD), Type=Flared (F) Dim=42x52 are the user selected values the corresponding equipment code field would be: SS-WD-F-42x51 This is done in order for all users of the database to build a proper code in the correct format.

What I have so far: I have the four fields and the equipment code field setup in a form, the equipment code text box has a control source of: =[Category] & "-" & [Item] & "-" & [Type] But when I select values of the four fields and the equipment code is populated I try to save the record and I get an error stating that the Equipment code field needs to be filled out. Three fields (Category, Item, and Type) are look-ups from other tables and Dimension is typed in.

View 14 Replies View Related

Taking 1 Field From Multiple Records And Merging Into One Comma-delimited File

Oct 24, 2007

Hi.

Stupid question, but I have Access 97 database with ssn in each record.
I need to create a comma-delimted text file with these ssns.

When I use the export text file with a query that lists each record's ssn, it does not produce comma-delimited file.

How?

Russ

View 5 Replies View Related

Forms :: Updating Field On Multiple Records Selected In Continuous Form?

Jun 12, 2013

I have a form listing tasks to which I make personnel assignments with a multi-value list field type. It takes some time to select from 15-25 employees on the list for each task, especially considering that small groups of employees will be assigned to the same selection of tasks.

What I want to do is select multiple records with the mouse, then click a command button opening a form in dialog mode with the selection list. The user then clicks to make his selections and clicks ok, which then updates the multi-select field for the selected records.

View 1 Replies View Related

Forms :: Multiple Field Screen Search - MSG Box Not Coming Up If No Records Found

Aug 18, 2015

I have created a multiple field search screen. The script is attached.

I would like to add a MSG Box "No records found" when the user types in information in any field where no records are available.

Just cannot get this working.

View 10 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved