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

Filter=True & =Sum(Field1 + Field2 ...)

P: n/a
This works fine:

Me.ForecastCurr.Form.Filter = "Year = " + Str(CurrYear)
Me.ForecastCurr.Form.FilterOn = True

And when I add this:

TextCurrYearTotal = Me.ForecastCurr.Form.[SumOfPeriods]
Me.ForecastCurr.Form.Filter = "Year = " + Str(CurrYear)
Me.ForecastCurr.Form.FilterOn = True

I get a value in TextCurrYearTotal, but, of course, it's the wrong
value. My problem is that when I do this:

Me.ForecastCurr.Form.Filter = "Year = " + Str(CurrYear)
Me.ForecastCurr.Form.FilterOn = True
TextCurrYearTotal = Me.ForecastCurr.Form.[SumOfPeriods]

I get nothing in TextCurrYearTotal. I know I've got to set the filter
first or my summary field will be meaningless, but when I set the
filter first I get nothing in the summary field.

Anyone have any ideas on getting around this?
Nov 13 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
I forgot to mention that this is Access 97.

we*****@verizon.net (Weaver) wrote in message news:<66*************************@posting.google.c om>...
This works fine:

Me.ForecastCurr.Form.Filter = "Year = " + Str(CurrYear)
Me.ForecastCurr.Form.FilterOn = True

And when I add this:

TextCurrYearTotal = Me.ForecastCurr.Form.[SumOfPeriods]
Me.ForecastCurr.Form.Filter = "Year = " + Str(CurrYear)
Me.ForecastCurr.Form.FilterOn = True

I get a value in TextCurrYearTotal, but, of course, it's the wrong
value. My problem is that when I do this:

Me.ForecastCurr.Form.Filter = "Year = " + Str(CurrYear)
Me.ForecastCurr.Form.FilterOn = True
TextCurrYearTotal = Me.ForecastCurr.Form.[SumOfPeriods]

I get nothing in TextCurrYearTotal. I know I've got to set the filter
first or my summary field will be meaningless, but when I set the
filter first I get nothing in the summary field.

Anyone have any ideas on getting around this?

Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.