A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Expression for combining multiple children with one parent in a qu



 
 
Thread Tools Display Modes
  #1  
Old October 14th, 2009, 02:34 AM posted to microsoft.public.access.queries
john15243
external usenet poster
 
Posts: 2
Default Expression for combining multiple children with one parent in a qu

Need query to create a form with parent name and multiple children listed in
same form. Tables include
ParentTable: ParentID, FirstName, LastName
ChildTable: ChildID, ParentID, FirstName, LastName
  #2  
Old October 14th, 2009, 02:48 AM posted to microsoft.public.access.queries
Bob Barrows
external usenet poster
 
Posts: 475
Default Expression for combining multiple children with one parent in a qu

john15243 wrote:
Need query to create a form with parent name and multiple children
listed in same form. Tables include
ParentTable: ParentID, FirstName, LastName
ChildTable: ChildID, ParentID, FirstName, LastName


I don't understand. Why don't you use the Form Wizard to do this? Just start
the wizard, select both tables when it prompts you for the table names (yes,
you are allowed to select more than one table), and then tell it which table
is the parent (master) table. When it's done you can look at the query it
created and see what it looks like.

Creating a query is similar: create a new query in Design View, add both
tables, click and drag the ParentID from one table object to the other to
create the join, and add the fields you want to the grid.

--
Microsoft MVP - ASP/ASP.NET - 2004-2007
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"


  #3  
Old October 15th, 2009, 04:22 PM posted to microsoft.public.access.queries
Duane Hookom
external usenet poster
 
Posts: 7,177
Default Expression for combining multiple children with one parent in a qu

If I understand correctly, you might want to try the generic concatenate
function at http://www.rogersaccesslibrary.com/f...sts.asp?TID=16.

--
Duane Hookom
Microsoft Access MVP


"john15243" wrote:

Need query to create a form with parent name and multiple children listed in
same form. Tables include
ParentTable: ParentID, FirstName, LastName
ChildTable: ChildID, ParentID, FirstName, LastName

  #4  
Old November 23rd, 2009, 05:51 PM posted to microsoft.public.access.queries
cynteeuh
external usenet poster
 
Posts: 31
Default Expression for combining multiple children with one parent in

Hello,

I've tried copying the below site's example, but I get a "run-time" error
message - "No value given for one or more required parameters." I'm not very
familiar with modules, but I did copy the function from the example to my db.
Was I supposed to modify anything with it?

Below is what I've created in a query.

Emails: Concatenate("SELECT email FROM qrycontactsExtended WHERE projectid
=" & [projectid]).

My Projects tbl has a one-to-many relationship with my contacts tbl.
Actually, I have a "Projects and Contacts" tbl to deal with the many-to-many
relationship with Projects and Contacts. Could this be part of the problem?

Any help is greatly appreciated!


"Duane Hookom" wrote:

If I understand correctly, you might want to try the generic concatenate
function at http://www.rogersaccesslibrary.com/f...sts.asp?TID=16.

--
Duane Hookom
Microsoft Access MVP


"john15243" wrote:

Need query to create a form with parent name and multiple children listed in
same form. Tables include
ParentTable: ParentID, FirstName, LastName
ChildTable: ChildID, ParentID, FirstName, LastName

  #5  
Old November 29th, 2009, 02:33 AM posted to microsoft.public.access.queries
Crystal (strive4peace)[_2_]
external usenet poster
 
Posts: 53
Default Expression for combining multiple children with one parent in

what is the SQL for qrycontactsExtended ?


Warm Regards,
Crystal
remote programming and training
http://MSAccessGurus.com

free video tutorials
http://www.YouTube.com/user/LearnAccessByCrystal

Access Basics
http://www.AccessMVP.com/strive4peace
free 100-page book that covers essentials in Access

*
(: have an awesome day
*


cynteeuh wrote:
Hello,

I've tried copying the below site's example, but I get a "run-time" error
message - "No value given for one or more required parameters." I'm not very
familiar with modules, but I did copy the function from the example to my db.
Was I supposed to modify anything with it?

Below is what I've created in a query.

Emails: Concatenate("SELECT email FROM qrycontactsExtended WHERE projectid
=" & [projectid]).

My Projects tbl has a one-to-many relationship with my contacts tbl.
Actually, I have a "Projects and Contacts" tbl to deal with the many-to-many
relationship with Projects and Contacts. Could this be part of the problem?

Any help is greatly appreciated!


"Duane Hookom" wrote:

If I understand correctly, you might want to try the generic concatenate
function at http://www.rogersaccesslibrary.com/f...sts.asp?TID=16.

--
Duane Hookom
Microsoft Access MVP


"john15243" wrote:

Need query to create a form with parent name and multiple children listed in
same form. Tables include
ParentTable: ParentID, FirstName, LastName
ChildTable: ChildID, ParentID, FirstName, LastName

 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 11:15 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.