subform master/child fields

  • Thread starter misschanda via AccessMonster.com
  • Start date
M

misschanda via AccessMonster.com

Hello You Guys,


I have a report based on the below sql. In the report the user can chooses
which data he/she wants to use based upon the entered parameter [orderdetails]
! [orderid].

The subform sql report is also based below.

The problem I am encountering is in the Master/Child field linkage. I am
using the Link Master Field = Orders.orderid ( i have also tried orderdetails.
orderid)
and the Child Field as [orderid]. when I include this I am prompted for the
order id, which is good, But also orders.... orders is the name of the table
that includes the field orderid.

When I do not use the linkage all is okay.. the subform yields all data but
still good.

I have tried removing the linkage fields and compacting, as directed by an
archive post, but still not help.

any help appreciated.

misschanda
 
M

misschanda via AccessMonster.com

misschanda said:
Hello You Guys,

I have a report based on the below sql. In the report the user can chooses
which data he/she wants to use based upon the entered parameter [orderdetails]
! [orderid].

The subform sql report is also based below.

The problem I am encountering is in the Master/Child field linkage. I am
using the Link Master Field = Orders.orderid ( i have also tried orderdetails.
orderid)
and the Child Field as [orderid]. when I include this I am prompted for the
order id, which is good, But also orders.... orders is the name of the table
that includes the field orderid.

When I do not use the linkage all is okay.. the subform yields all data but
still good.

I have tried removing the linkage fields and compacting, as directed by an
archive post, but still not help.

any help appreciated.

misschanda


REPORT:

SELECT DISTINCTROW Orders.*, OrderDetails.*, SampleDetails.*, Customers.*,
Priorities.Text AS [Priority Text], CustomerAddresses.*, [City] & ", " &
[State] & " " & [ZipCode] AS CSZ, [Enter Order ID] AS Expr1
FROM (((Customers RIGHT JOIN Orders ON Customers.CustomerID = Orders.
CustomerID) INNER JOIN (OrderDetails INNER JOIN SampleDetails ON
(OrderDetails.SampleNumber = SampleDetails.SampleNumber) AND (OrderDetails.
OrderID = SampleDetails.OrderID)) ON Orders.OrderID = OrderDetails.OrderID)
INNER JOIN Priorities ON SampleDetails.Priority = Priorities.Priority) INNER
JOIN CustomerAddresses ON Orders.CustomerID = CustomerAddresses.CustomerID
WHERE ((([Enter Order ID])=[Orderdetails]![orderid]));



SUBFORM:

SELECT Setup_SampleConditions.QuestionText, Orders_SampleConditions.Answer,
Orders_SampleConditions.OrderID
FROM Orders_SampleConditions INNER JOIN Setup_SampleConditions ON
Orders_SampleConditions.QuestionID = Setup_SampleConditions.QuestionID;
 
K

KARL DEWEY

The problem as I see it is that OrderID of Orders_SampleConditions is not
related to any OrderID in the query for the main report.

--
KARL DEWEY
Build a little - Test a little


misschanda via AccessMonster.com said:
misschanda said:
Hello You Guys,

I have a report based on the below sql. In the report the user can chooses
which data he/she wants to use based upon the entered parameter [orderdetails]
! [orderid].

The subform sql report is also based below.

The problem I am encountering is in the Master/Child field linkage. I am
using the Link Master Field = Orders.orderid ( i have also tried orderdetails.
orderid)
and the Child Field as [orderid]. when I include this I am prompted for the
order id, which is good, But also orders.... orders is the name of the table
that includes the field orderid.

When I do not use the linkage all is okay.. the subform yields all data but
still good.

I have tried removing the linkage fields and compacting, as directed by an
archive post, but still not help.

any help appreciated.

misschanda


REPORT:

SELECT DISTINCTROW Orders.*, OrderDetails.*, SampleDetails.*, Customers.*,
Priorities.Text AS [Priority Text], CustomerAddresses.*, [City] & ", " &
[State] & " " & [ZipCode] AS CSZ, [Enter Order ID] AS Expr1
FROM (((Customers RIGHT JOIN Orders ON Customers.CustomerID = Orders.
CustomerID) INNER JOIN (OrderDetails INNER JOIN SampleDetails ON
(OrderDetails.SampleNumber = SampleDetails.SampleNumber) AND (OrderDetails.
OrderID = SampleDetails.OrderID)) ON Orders.OrderID = OrderDetails.OrderID)
INNER JOIN Priorities ON SampleDetails.Priority = Priorities.Priority) INNER
JOIN CustomerAddresses ON Orders.CustomerID = CustomerAddresses.CustomerID
WHERE ((([Enter Order ID])=[Orderdetails]![orderid]));



SUBFORM:

SELECT Setup_SampleConditions.QuestionText, Orders_SampleConditions.Answer,
Orders_SampleConditions.OrderID
FROM Orders_SampleConditions INNER JOIN Setup_SampleConditions ON
Orders_SampleConditions.QuestionID = Setup_SampleConditions.QuestionID;
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top