Mike Magnant
New member
- Local time
- Today, 13:29
- Joined
- May 22, 2013
- Messages
- 6
Form Demo. Allows the choice of Customer Name and Project Name to be printed.
There is a column in the query in the report that seems to relate to the Form Demo but I do not know how to change the query below to show only the project selected in the form?
SELECT Tasks.ID AS TaskNo, Customers.[Customer Number] AS CustomerNumber, Customers.Notes, Customers.Notes2, Customers.Company, Tasks.*, Projects.Origin AS Origin, Customers.CustomerName AS CustName, Projects.FSC, Projects.FSCPercent, Projects.Destination AS Destination, Projects.Category AS Category, Projects.EmployeeRate AS EmployeeRate, Projects.ProjectName AS ProjectName, Projects.CustomerRate, Users.FullName AS UserFullName, Customers.Terms, Projects.PO_Number, IIf([Tons]>0,([Tons]*[CustomerRate]),IIf([Yards]>0,([Yards]*[CustomerRate]),IIf([Hours]>0,([Hours]*[CustomerRate]),IIf([Gross]>0,(([Gross]-[Tare])/2000)*[CustomerRate],[CustomerRate])))) AS Result
FROM Customers, Projects, Tasks, Users
WHERE (((Projects!CustomerID)=Forms!Demo!cmbCustomerName And (Projects!CustomerID)=Customers!ID) And ((Projects!ID)=Tasks!ProjectID) And ((Tasks!AssignedToUserID)=Users!ID) And ((Tasks!Status)='10'))
ORDER BY ProjectName;
THANKS
There is a column in the query in the report that seems to relate to the Form Demo but I do not know how to change the query below to show only the project selected in the form?
SELECT Tasks.ID AS TaskNo, Customers.[Customer Number] AS CustomerNumber, Customers.Notes, Customers.Notes2, Customers.Company, Tasks.*, Projects.Origin AS Origin, Customers.CustomerName AS CustName, Projects.FSC, Projects.FSCPercent, Projects.Destination AS Destination, Projects.Category AS Category, Projects.EmployeeRate AS EmployeeRate, Projects.ProjectName AS ProjectName, Projects.CustomerRate, Users.FullName AS UserFullName, Customers.Terms, Projects.PO_Number, IIf([Tons]>0,([Tons]*[CustomerRate]),IIf([Yards]>0,([Yards]*[CustomerRate]),IIf([Hours]>0,([Hours]*[CustomerRate]),IIf([Gross]>0,(([Gross]-[Tare])/2000)*[CustomerRate],[CustomerRate])))) AS Result
FROM Customers, Projects, Tasks, Users
WHERE (((Projects!CustomerID)=Forms!Demo!cmbCustomerName And (Projects!CustomerID)=Customers!ID) And ((Projects!ID)=Tasks!ProjectID) And ((Tasks!AssignedToUserID)=Users!ID) And ((Tasks!Status)='10'))
ORDER BY ProjectName;
THANKS
Last edited: