Set Value

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a subform and I thought I would set the value of two caluculated
fields to another blank field bound to a table. Then I could make invisible
the field bound to the table and sum it. I can't use the conventional way to
sum the unbound fields because one of the fields is a domain aggregate
function. Problem is I don't know what event to use. Nothing works.
 
Here goes:

I have a subform with 3 amounts:

1) "Budget" from the record source
2) "Paid" (hidden) which is a Domain Aggregate Function
3) "Amount Remaining" which is a calcuation: =[Budget]-[Paid]

I want "Amount Remaining" per line item (the subform contains subline items)
at the bottom of subform but =Sum([Budget]-[Paid]) doesn't work, I can only
assume because "Paid" is a Domain Aggregate Function.

I thought setting the value of [Budget]-[Paid] to a bound field in the
record source would work because I could sum that, but all the events I've
tried haven't worked. I haven't tried all of them though. Thanks for your
time.
 
You can't use the name of the field [Paid] in the calculation. Instead, you
have to insert the Domaine Aggregate Function in it's place:

= [Budget] - DLookup("SomeField","SomeDomain", "SomeCriteria")

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm
Jeff Conrad's Access Junkie List:
http://home.bendbroadband.com/conradsystems/accessjunkie.html



StephWhitley said:
Here goes:

I have a subform with 3 amounts:

1) "Budget" from the record source
2) "Paid" (hidden) which is a Domain Aggregate Function
3) "Amount Remaining" which is a calcuation: =[Budget]-[Paid]

I want "Amount Remaining" per line item (the subform contains subline
items)
at the bottom of subform but =Sum([Budget]-[Paid]) doesn't work, I can
only
assume because "Paid" is a Domain Aggregate Function.

I thought setting the value of [Budget]-[Paid] to a bound field in the
record source would work because I could sum that, but all the events I've
tried haven't worked. I haven't tried all of them though. Thanks for
your
time.
--
Steph


Lynn Trapp said:
Hi Steph,
Can you provide us with an example of what you want?

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm
Jeff Conrad's Access Junkie List:
http://home.bendbroadband.com/conradsystems/accessjunkie.html
 
Back
Top