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?
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
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!
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:
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...
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.
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?
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?
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
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
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.
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.
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.
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...
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 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.
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.
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.
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.