B
Bill - ESAI
Hi All
I'm struggling with an issue here that I would love input on.
Here's what I want.
I have a table called Projects with the following attributes:
ProjectID
ActualCompletionDate
Department
plus more
I also have a table called tbl_Savings with these attributes:
save_Amount
save_ProjectID
Benefit_Type
plus more
Here's a query that I called qryGetSavingsByDepartment:
SELECT tbl_Savings.save_Amount, tbl_Savings.Benefit_Type,
Projects.Department, Projects.ProjectID, Projects.ActualCompDate
FROM Projects INNER JOIN tbl_Savings ON Projects.ProjectID =
tbl_Savings.save_ProjectID
WHERE (((tbl_Savings.save_Amount) Is Not Null));
I have a form field where this is the actual path:
[forms]![frmMainMenu]![txtDepartmentParameter]
I've tried adding Projects.Department =
[forms]![frmMainMenu]![txtDepartmentParameter] to the WHERE condition which
works fine if I run this query on it's own.
Now I have a CrossTab query like so:
TRANSFORM Sum(qryGetSavingsbyDepartment.save_Amount) AS SumOfsave_Amount
SELECT qryGetSavingsbyDepartment.Benefit_Type,
Sum(qryGetSavingsbyDepartment.save_Amount) AS [Total Of save_Amount]
FROM qryGetSavingsbyDepartment
GROUP BY qryGetSavingsbyDepartment.Benefit_Type
PIVOT qryGetSavingsbyDepartment.Department;
I need the result to be filtered on the Projects.Department but no matter
what I've tried so far, when trying to use the form field
"[forms]![frmMainMenu]![txtDepartmentParameter]" Access tellings me that it
can't find the form element. If I copy and past that path in a simple query
to select all projects the path works fine. I seems to have something to do
the CrossTab query.
Any help would be greatly appreciate.
TY
Bill
I'm struggling with an issue here that I would love input on.
Here's what I want.
I have a table called Projects with the following attributes:
ProjectID
ActualCompletionDate
Department
plus more
I also have a table called tbl_Savings with these attributes:
save_Amount
save_ProjectID
Benefit_Type
plus more
Here's a query that I called qryGetSavingsByDepartment:
SELECT tbl_Savings.save_Amount, tbl_Savings.Benefit_Type,
Projects.Department, Projects.ProjectID, Projects.ActualCompDate
FROM Projects INNER JOIN tbl_Savings ON Projects.ProjectID =
tbl_Savings.save_ProjectID
WHERE (((tbl_Savings.save_Amount) Is Not Null));
I have a form field where this is the actual path:
[forms]![frmMainMenu]![txtDepartmentParameter]
I've tried adding Projects.Department =
[forms]![frmMainMenu]![txtDepartmentParameter] to the WHERE condition which
works fine if I run this query on it's own.
Now I have a CrossTab query like so:
TRANSFORM Sum(qryGetSavingsbyDepartment.save_Amount) AS SumOfsave_Amount
SELECT qryGetSavingsbyDepartment.Benefit_Type,
Sum(qryGetSavingsbyDepartment.save_Amount) AS [Total Of save_Amount]
FROM qryGetSavingsbyDepartment
GROUP BY qryGetSavingsbyDepartment.Benefit_Type
PIVOT qryGetSavingsbyDepartment.Department;
I need the result to be filtered on the Projects.Department but no matter
what I've tried so far, when trying to use the form field
"[forms]![frmMainMenu]![txtDepartmentParameter]" Access tellings me that it
can't find the form element. If I copy and past that path in a simple query
to select all projects the path works fine. I seems to have something to do
the CrossTab query.
Any help would be greatly appreciate.
TY
Bill