techsponge
Technical User
I have a query that calculates the pull percentage on a game.
The query works perfectly when I hard code the WashStampNum for the criteria. I would like to display this percentage on a few different forms.
I know I could enter [Forms]![frmSales]![WashStampNum] in the criteria to pull the number from the frmSales, but I would like to pass the WashStampNum from a few different forms where this WashStampNum number is displayed.
Esentially I would like to put the following in the WashStampNum criteria:
[Forms]![frmSales]![WashStampNum]
[Forms]![frmClosedGames]![WashStampNum]
[Forms]![frmActiveGames]![WashStampNum]
[Forms]![frmEmployeeSales]![WashStampNum]
Current query SQL:
Hope this is descriptive enough?
The query works perfectly when I hard code the WashStampNum for the criteria. I would like to display this percentage on a few different forms.
I know I could enter [Forms]![frmSales]![WashStampNum] in the criteria to pull the number from the frmSales, but I would like to pass the WashStampNum from a few different forms where this WashStampNum number is displayed.
Esentially I would like to put the following in the WashStampNum criteria:
[Forms]![frmSales]![WashStampNum]
[Forms]![frmClosedGames]![WashStampNum]
[Forms]![frmActiveGames]![WashStampNum]
[Forms]![frmEmployeeSales]![WashStampNum]
Current query SQL:
Code:
SELECT TblMasterGameList.WashStampNum, TblMasterGameList.GameName, QryGamePayout.[Total Payout], QryGameSales.TotalSlaes, TblMasterGameList.UnitCost AS [Game Cost], TblMasterGameList.TktPrice, TblMasterGameList.TktCount, [total payout]+[Game Cost] AS [Cost To Date], QryGameSales.[Qty Sold], 1-[Cost To Date]/[TotalSlaes] AS [Pull Percent]
FROM (TblMasterGameList LEFT JOIN QryGamePayout ON TblMasterGameList.WashStampNum = QryGamePayout.WashStampNum) LEFT JOIN QryGameSales ON TblMasterGameList.WashStampNum = QryGameSales.WashStampNum
WHERE (((TblMasterGameList.WashStampNum)="34166411"));
Hope this is descriptive enough?