Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

1 Master Query with 2 Child Queries

Status
Not open for further replies.

RobotMush

Technical User
Aug 18, 2004
197
US
Is it possible to have one query in a one-to-many relationship with two other queries? Or do I need to merge my two child quiries into one?

I would like to keep the queries seprate but if it is not possbile then how would I merge the two child queries?

Thank you for your help

RobotMush (Technical User) Self Taught
 
You may use any SELECT saved query as a regular table in another query, so I don't understand your question ...

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Ok, here is my problem. In the Master query properties list I am able to have one query as the subdatasheet name, with the proper Master field and child field. However when I try to put two queries in subdatasheet line where both have the same child field name it give me the following error message...
"The table or Query name'[Query.Data-qry],[Query.qryScndRecHC]' you entered in either the property sheet or macro is misspelled or refers to a table or query that does not exist."

The queries exist and are spelled correctly. Is it possible for a Master field in a query to have more than one child field for two different queries?

Thank you for your help

RobotMush (Technical User) Self Taught
 
how would I merge the two child queries
An UNION query ?
A JOIN ?
What is your real issue ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
What I am wanting to do, if possible is to have the Master query be able to point to one or the other of the two child queries.
Is that possible?

RobotMush (Technical User) Self Taught
 
Yes, as long as you have a sensable field to connect those query's. CustomerID or WhatHaveYouID

Pampers [afro]
There is only one way to change a diaper - fast
 
Thank you Pampers, could you elaborate on that?
When I try to put two child query names on the Link Child field in properties it does not accept them. How should I be doing this?

RobotMush (Technical User) Self Taught
 
you must link them in the query itself, not on the form. Put your query's in a new query, and link the two.



Pampers [afro]
There is only one way to change a diaper - fast
 
Link the Master query to the child query or the two child queries together?

RobotMuch (Technical User) Self Taught
 
Whichever you want. But don't call it Master Query and Child Query, it is confusing because those are terms you use to connect forms and subforms. You can connect query's in the query's builder, by dragging and dropping the relevant fields. F.i. drop CustomerID in query1 on ConstomerID in query2 and you establish a relationship.

Pampers [afro]
There is only one way to change a diaper - fast
 
Thank you, I believe that helps in what I am wanting to do.

RobotMush (Technical User) Self Taught
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top