G
Guest
hi
i have a table with cost records and a dateyear field
on my form i can use the =Sum([cost]) gives me running total but i would
like to add a text box that can use a public variable 'curyear' to select
currrent year totals. i have a query that does it but how do i get the text
box to show the calculated value of the query?
query:
SELECT Sum(mobileusage.cost) AS cost
FROM years INNER JOIN mobileusage ON years.yearidx=mobileusage.billdateyear
WHERE (((mobileusage.billdateyear)=(SELECT years.yearidx FROM years WHERE
((years.yearid)=[curyear]) ) ));
does that make sense?
David
i have a table with cost records and a dateyear field
on my form i can use the =Sum([cost]) gives me running total but i would
like to add a text box that can use a public variable 'curyear' to select
currrent year totals. i have a query that does it but how do i get the text
box to show the calculated value of the query?
query:
SELECT Sum(mobileusage.cost) AS cost
FROM years INNER JOIN mobileusage ON years.yearidx=mobileusage.billdateyear
WHERE (((mobileusage.billdateyear)=(SELECT years.yearidx FROM years WHERE
((years.yearid)=[curyear]) ) ));
does that make sense?
David