M
Michael
Hello,
I have a table with one of the fields "Cost".
I wish to accept an input parameter from the user
of "Total Budget"
I then wish to print all of the cost rows until the total
budget is reached.
I know if I were writing a program the logic would be some
like
Sort table by Date
VarCost = 0
Do while varCost + Cost < TotalBudget
Print row
Fetch Next Row
varCost = varCost + Cost
End
Can I do this logic using a query only perhaps using the
Expression Builder? If so how? I can't figure out how to
increment a variable on a field in the current table, then
stopping once a total figure is hit.
Thanks in advance for your time and guidance. I am new at
Access, put do have a programming background. I am hoping
to do this all in Access.
Thanks,
Michael
I have a table with one of the fields "Cost".
I wish to accept an input parameter from the user
of "Total Budget"
I then wish to print all of the cost rows until the total
budget is reached.
I know if I were writing a program the logic would be some
like
Sort table by Date
VarCost = 0
Do while varCost + Cost < TotalBudget
Print row
Fetch Next Row
varCost = varCost + Cost
End
Can I do this logic using a query only perhaps using the
Expression Builder? If so how? I can't figure out how to
increment a variable on a field in the current table, then
stopping once a total figure is hit.
Thanks in advance for your time and guidance. I am new at
Access, put do have a programming background. I am hoping
to do this all in Access.
Thanks,
Michael