MackMan
Registered User.
- Local time
- Today, 13:55
- Joined
- Nov 25, 2014
- Messages
- 174
Now, please don't laugh...
I'm trying to perform what will no doubt to many, be the simplest of Access functions... but to me - well, it's driving me crazy, and I've been just about every conceivable way through the problem, with no luck - despite trolling these forums for hours.
All I'm after is, to sum in all records "where" reconcileDate (on the sub=form) = today in both the credit and debit fields and minus one from the other (image attached)
As you can see, I have a simple form and sub-form. On the sub-form I have a query based calculation that returns the following...
"if ReconcileDate (on sub-form) = today, then show Debit value in yndebit" textbox
Likewise with the credit box, and all works perfectly fine. so far so good...
However, I can't seem to sum these two boxes. Because the circled textboxes are query based, I've used the query as the control source (and not the text boxes) and all I get is an #ERROR? when placed in the form footer. I've tried to do this using the textboxes as the control source, and still nothing. I've tried to add a calculated control on the form itself, and still #ERROR? or #NAME? despite knowing exactly how to reference subforms within forms (this I've become quite an expert at as I simply use query design to make sure I have the correct path and control)anyway... I'm not at a loss, and starting to think it's time to give up
Like I say, an incredibly simple function to sum for some.
Any help to point me in the right direction would be greatly appreciated.
I'm trying to perform what will no doubt to many, be the simplest of Access functions... but to me - well, it's driving me crazy, and I've been just about every conceivable way through the problem, with no luck - despite trolling these forums for hours.
All I'm after is, to sum in all records "where" reconcileDate (on the sub=form) = today in both the credit and debit fields and minus one from the other (image attached)
As you can see, I have a simple form and sub-form. On the sub-form I have a query based calculation that returns the following...
"if ReconcileDate (on sub-form) = today, then show Debit value in yndebit" textbox
Likewise with the credit box, and all works perfectly fine. so far so good...
However, I can't seem to sum these two boxes. Because the circled textboxes are query based, I've used the query as the control source (and not the text boxes) and all I get is an #ERROR? when placed in the form footer. I've tried to do this using the textboxes as the control source, and still nothing. I've tried to add a calculated control on the form itself, and still #ERROR? or #NAME? despite knowing exactly how to reference subforms within forms (this I've become quite an expert at as I simply use query design to make sure I have the correct path and control)anyway... I'm not at a loss, and starting to think it's time to give up

Like I say, an incredibly simple function to sum for some.
Any help to point me in the right direction would be greatly appreciated.