Hi there,
I am currently working on an Access 2010 project and I am having some trouble with the expression builder. I have to populate 5 fields using the sum function. I have attached a screenshot of the report for a better idea.
The following 5 fields (Passenger, Agricultural, Truck, ATV and Forklift) need to be populated the "TotalPTE" sum of each respective tire type.
To do this, I wrote 5 different queries which I use in the Expression Builder to get the SUM of the Total PTE for each.
here is the query:
When I run this query, I get the right data. But when I run the report, I am prompt to enter the amount parameter. Not to sure why. I have also attached my expression from the expression builder and a screenshot of the prompt.
I would really appreciate any help. I don't want to be prompted for the amount when the query returns it with no problem.
[IMGnothumb]http://bytes.com/attachments/attachment/6401d1338223713/expressionbuild er.jpg[/IMGnothumb]
[IMGnothumb]http://bytes.com/attachments/attachment/6402d1338223713/prompt.png[/IMGnothumb]
[IMGnothumb]http://bytes.com/attachments/attachment/6403d1338223713/report.jpg[/IMGnothumb]
Thank you
I am currently working on an Access 2010 project and I am having some trouble with the expression builder. I have to populate 5 fields using the sum function. I have attached a screenshot of the report for a better idea.
The following 5 fields (Passenger, Agricultural, Truck, ATV and Forklift) need to be populated the "TotalPTE" sum of each respective tire type.
To do this, I wrote 5 different queries which I use in the Expression Builder to get the SUM of the Total PTE for each.
here is the query:
Code:
SELECT ScrapTireType.PTEamount, ScrapTireType.description, ScrapCollectionTireType.amount, ScrapCollection.regNum, ScrapCollection.invoiceNum, ScrapCollection.Date, ScrapCollection.driverSigned, ScrapCollection.retailerSigned, ScrapCollection.PTEtotal, ScrapCollection.scrapCollectionID FROM ScrapCollection INNER JOIN (ScrapTireType INNER JOIN ScrapCollectionTireType ON (ScrapTireType.scrapTireTypeID = ScrapCollectionTireType.scrapTireTypeID) AND (ScrapTireType.scrapTireTypeID = ScrapCollectionTireType.scrapTireTypeID)) ON ScrapCollection.scrapCollectionID = ScrapCollectionTireType.scrapCollectionID WHERE (((ScrapTireType.PTEamount)=[Reports]![RPTEDetailsEndDate]![amount]) AND ((ScrapTireType.description)="Passenger") AND ((ScrapCollection.regNum)=[Forms]![PTEDetailsNew]![regNum]) AND ((ScrapCollection.Date)<=[Forms]![PTEDetailsNew]![endDate])) ORDER BY ScrapCollection.Date DESC;
I would really appreciate any help. I don't want to be prompted for the amount when the query returns it with no problem.
[IMGnothumb]http://bytes.com/attachments/attachment/6401d1338223713/expressionbuild er.jpg[/IMGnothumb]
[IMGnothumb]http://bytes.com/attachments/attachment/6402d1338223713/prompt.png[/IMGnothumb]
[IMGnothumb]http://bytes.com/attachments/attachment/6403d1338223713/report.jpg[/IMGnothumb]
Thank you
Comment