By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,164 Members | 969 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,164 IT Pros & Developers. It's quick & easy.

Calculations in a subform

P: 1
This is probably a very basic question, but my Access knowledge has fallen out of my head after a few months of non-use.

I have a subform which has two currency values in it. I want there to be a column in the subform where it will total the two values automatically. I've tried to do this two ways: 1) Creating a query and trying to set that as my control source so the value of the query will populate the field on my subform; and 2) Using the expression builder to add the two fields, and populate the Total field.

Neither of these ways have worked. I'm certain it's user error, but even with all the books I have, I can't seem to figure out exactly what I've done wrong. Anyone have any ideas??
Dec 7 '06 #1
Share this Question
Share on Google+
3 Replies


P: 33
Perhaps if you put some code into the "On Current" or "On Load" of your subform.
If you populate it that way, you can leave the record source unbound.
Dec 7 '06 #2

NeoPa
Expert Mod 15k+
P: 31,660
Perhaps if you put some code into the "On Current" or "On Load" of your subform.
If you populate it that way, you can leave the record source unbound.
The OnCurrent event is what you'd want here.
However, I think the two methods tried by the questioner are probably more straightforward.
Good to see you posting Sandro :).
Dec 8 '06 #3

NeoPa
Expert Mod 15k+
P: 31,660
I've tried to do this two ways: 1) Creating a query and trying to set that as my control source so the value of the query will populate the field on my subform; and 2) Using the expression builder to add the two fields, and populate the Total field.
Anyone have any ideas??
These two ideas are both good and should work if implemented correctly (assuming all you've told us is accurate in its detail).
The first idea would, however, make the recordset non-updatable (in case that's an issue).
The second should work fully.
Tell us how you've tried to implement this including fields etc and we can look for the problem.
Dec 8 '06 #4

Post your reply

Sign in to post your reply or Sign up for a free account.