PC Review


Reply
Thread Tools Rating: Thread Rating: 5 votes, 1.00 average.

Combine text values from many records into a single textbox

 
 
skoalnreds
Guest
Posts: n/a
 
      30th Jul 2010
Is this possible in Access? I have done it in VFP but cannot figure
it out in Access:

I have a display-only form with various controls that reads in values
from several tables. There is also a "Notes" textbox that I would
like to populate by combining all notes records related to a
particular Item_ID and displaying them in one textbox (again for
display purposes only):

Tables are set up like this:
Item_Master has an item_id field (et al).

ProdNotesXref is a cross reference table and has an Item_id field and
a Note_id field. There are instances where a single item_id appears
in multiple rows, each pointng to a different note_id field.

ProdNotes has a Note_id field and the actual memo field with the
Notes.

ITEM_MASTER:
Item_id
001
<etc>

PRODNOTESXREF:
Item_id Note_id
001 178
001 224
001 316
002 178
002 076
003 316
003 271
<etc>

PRODNOTES:
Note_id Note
178 Item was made in Canary, Blue and Amber in 1925.
<...>
224 Was sold as a set with item #099.
<...>
316 Mold was sold to another company, who re-
released the item.
<...>

So the end result in the read-only text box would be the three lines
of notes in prodnotes whose note_id is associated with the item_id in
the xref table.

Thanks for any help you can provide.
 
Reply With Quote
 
 
 
 
John Spencer
Guest
Posts: n/a
 
      30th Jul 2010
Here are links (url) to three examples on concatenating a field from multiple
records into one field in one record of a query

Duane Hookom
http://www.rogersaccesslibrary.com/f...sts.asp?TID=16

Allen Browne
http://allenbrowne.com/func-concat.html

The Access Web
http://www.mvps.org/access/modules/mdl0004.htm

John Spencer
Access MVP 2002-2005, 2007-2010
The Hilltop Institute
University of Maryland Baltimore County

skoalnreds wrote:
> Is this possible in Access? I have done it in VFP but cannot figure
> it out in Access:
>
> I have a display-only form with various controls that reads in values
> from several tables. There is also a "Notes" textbox that I would
> like to populate by combining all notes records related to a
> particular Item_ID and displaying them in one textbox (again for
> display purposes only):
>
> Tables are set up like this:
> Item_Master has an item_id field (et al).
>
> ProdNotesXref is a cross reference table and has an Item_id field and
> a Note_id field. There are instances where a single item_id appears
> in multiple rows, each pointng to a different note_id field.
>
> ProdNotes has a Note_id field and the actual memo field with the
> Notes.
>
> ITEM_MASTER:
> Item_id
> 001
> <etc>
>
> PRODNOTESXREF:
> Item_id Note_id
> 001 178
> 001 224
> 001 316
> 002 178
> 002 076
> 003 316
> 003 271
> <etc>
>
> PRODNOTES:
> Note_id Note
> 178 Item was made in Canary, Blue and Amber in 1925.
> <...>
> 224 Was sold as a set with item #099.
> <...>
> 316 Mold was sold to another company, who re-
> released the item.
> <...>
>
> So the end result in the read-only text box would be the three lines
> of notes in prodnotes whose note_id is associated with the item_id in
> the xref table.
>
> Thanks for any help you can provide.

 
Reply With Quote
 
skoalnreds
Guest
Posts: n/a
 
      30th Jul 2010
On Jul 30, 2:07*pm, John Spencer <JSPEN...@Hilltop.umbc> wrote:
> Here are links (url) to three examples on concatenating a field from multiple
> records into one field in one record of a query
>
> Duane Hookomhttp://www.rogersaccesslibrary.com/forum/forum_posts.asp?TID=16
>
> Allen Brownehttp://allenbrowne.com/func-concat.html
>
> The Access Webhttp://www.mvps.org/access/modules/mdl0004.htm
>
> John Spencer
> Access MVP 2002-2005, 2007-2010
> The Hilltop Institute
> University of Maryland Baltimore County
>
>
>
> skoalnreds wrote:
> > Is this possible in Access? *I have done it in VFP but cannot figure
> > it out in Access:

>
> > I have a display-only form with various controls that reads in values
> > from several tables. *There is also a "Notes" textbox that I would
> > like to populate by combining all notes records related to a
> > particular Item_ID and displaying them in one textbox (again for
> > display purposes only):

>
> > Tables are set up like this:
> > Item_Master has an item_id field (et al).

>
> > ProdNotesXref is a cross reference table and has an Item_id field and
> > a Note_id field. *There are instances where a single item_id appears
> > in multiple rows, each pointng to a different note_id field.

>
> > ProdNotes has a Note_id field and the actual memo field with the
> > Notes.

>
> > ITEM_MASTER:
> > Item_id
> > 001
> > <etc>

>
> > PRODNOTESXREF:
> > Item_id * * * * * * Note_id
> > 001 * * * * * * * * *178
> > 001 * * * * * * * * *224
> > 001 * * * * * * * * *316
> > 002 * * * * * * * * *178
> > 002 * * * * * * * * *076
> > 003 * * * * * * * * *316
> > 003 * * * * * * * * *271
> > <etc>

>
> > PRODNOTES:
> > Note_id * * * * * * Note
> > 178 * * * * * * * * * Item was made in Canary, Blue and Amber in 1925.
> > <...>
> > 224 * * * * * * * * * Was sold as a set with item #099.
> > <...>
> > 316 * * * * * * * * * Mold was sold to another company, who re-
> > released the item.
> > <...>

>
> > So the end result in the read-only text box would be the three lines
> > of notes in prodnotes whose note_id is associated with the item_id in
> > the xref table.

>
> > Thanks for any help you can provide.- Hide quoted text -

>
> - Show quoted text -


Perfect. Just what I was looking for...thank you!
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
combine records from child into one textbox in parent hikaru Microsoft Access Forms 2 6th Oct 2008 01:11 PM
Combine records in a single record =?Utf-8?B?R2Vvcmdl?= Microsoft Access 4 30th Jul 2007 05:22 AM
How do I combine multiple records for a single item? =?Utf-8?B?RHJTdG9uZTk4?= Microsoft Excel Misc 1 30th Apr 2007 11:22 PM
How do I combine multiple records for a single item? =?Utf-8?B?RHJTdG9uZTk4?= Microsoft Excel Misc 1 30th Apr 2007 10:24 PM
How to Combine Multiple Records into a Single Record Adding the Quantity Values of Same Fields Ken Microsoft Access Queries 4 17th Aug 2006 03:21 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:31 PM.