Active Forms And Queries

Tinny

Registered User.
Local time
Yesterday, 16:45
Joined
Oct 29, 2006
Messages
20
i try to get a query in a report from three diffrents forms but it works only from the active form (Main) and not from subforms. If i use only one form everythings it's ok

SELECT tbl_Customers.LastName, tbl_Customers.FisrtName, tbl_Agreements.CarId
FROM tbl_Customers INNER JOIN (tbl_Agreements INNER JOIN tbl_Transactions ON tbl_Agreements.AgreementId = tbl_Transactions.AgreementId) ON tbl_Customers.CustomerId = tbl_Agreements.CustomerId
GROUP BY tbl_Customers.LastName, tbl_Customers.FisrtName, tbl_Agreements.CarId
HAVING (((tbl_Customers.LastName)=[Forms]![frm_Customers].[LastName]) AND ((tbl_Customers.FisrtName)=[Forms]![frm_Customers].[FisrtName]) AND ((tbl_Agreements.CarId)=[Forms]![frm_Agreements].[CarId]));

If I open the tree different form and put the mouse I a records the query works fine. How can I do it works the query the two subforms in my main form?
 

Users who are viewing this thread

Back
Top Bottom