telepathetic
New member
- Local time
- Today, 02:10
- Joined
- Apr 23, 2001
- Messages
- 8
Hello!! I have one main form called Receipts, and I have two subforms called Assets and Expenses. There is a many-to-one relationship for each of the subforms to the main form keyed off the Receipt ID. I want to include a Total field in the main form that totals the current Assets and Expenses associated with the current Receipt ID. Ideally this would update itself with every additional Asset or Expense entered. I have tried so many things and am having so many problems... I'm probably missing some easy solution, but in case you're curious-- here's what i've tried so far: I've created a new textbox in the main form called "Total", and I have assigned it to = DSum ("[Amount]", "Assets", "[Receipt ID] = Forms![Receipts]![Receipt ID]") + DSum ("[Amount]", "Expenses", "[Receipt ID] = Forms![Receipts]![Receipt ID]")
This seems to work very occasionally. I've tried to update the field more often by adding Requery's in the subforms, but that gives many errors-- i'm assuming the subforms can't requery any main form control.
Thank you for any help!
This seems to work very occasionally. I've tried to update the field more often by adding Requery's in the subforms, but that gives many errors-- i'm assuming the subforms can't requery any main form control.
Thank you for any help!