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

statement to filter subform

P: 56
tara is the name of my table and the is what I have in the qry:

Field TARA.*
Field NetC criteria = 0
Field PendDte criteria Is null
Field EffDateCompare: Year([billeffdte]) & Month([billeffdte])
Criteria: Year(DateAdd("m",-2,[rptdt])) & Month(DateAdd("m",-2,
[rptdt]))


And I went to view the sql stament and it said:


SELECT TARA.*, Year([billeffdte]) & Month([billeffdte]) AS
EffDateCompare
FROM TARA
WHERE (((TARA.NetC)=0) AND ((TARA.PendDte) Is Null) AND
((Year([billeffdte]) & Month([billeffdte]))=Year(DateAdd("m",-2,
[rptdt])) & Month(DateAdd("m",-2,[rptdt]))));


What I am trying do do is write the above statement in the after
update of an option button on a form so that it will filter my
subform.


Hope this makes more sense.
Feb 3 '07 #1
Share this Question
Share on Google+
3 Replies


MMcCarthy
Expert Mod 10K+
P: 14,534
tara is the name of my table and the is what I have in the qry:

Field TARA.*
Field NetC criteria = 0
Field PendDte criteria Is null
Field EffDateCompare: Year([billeffdte]) & Month([billeffdte])
Criteria: Year(DateAdd("m",-2,[rptdt])) & Month(DateAdd("m",-2,
[rptdt]))


And I went to view the sql stament and it said:


SELECT TARA.*, Year([billeffdte]) & Month([billeffdte]) AS
EffDateCompare
FROM TARA
WHERE (((TARA.NetC)=0) AND ((TARA.PendDte) Is Null) AND
((Year([billeffdte]) & Month([billeffdte]))=Year(DateAdd("m",-2,
[rptdt])) & Month(DateAdd("m",-2,[rptdt]))));


What I am trying do do is write the above statement in the after
update of an option button on a form so that it will filter my
subform.


Hope this makes more sense.
Why do you need to put it in the after update of an option button. Why not just set it as the recordsource of the subform?
Feb 4 '07 #2

P: 56
Why do you need to put it in the after update of an option button. Why not just set it as the recordsource of the subform?
because there are multiple options to chose from. I got it to work though. Thanks.
Feb 4 '07 #3

MMcCarthy
Expert Mod 10K+
P: 14,534
because there are multiple options to chose from. I got it to work though. Thanks.
No problem favor.

If you get time post the solution here as it could be useful to other members.

Mary
Feb 4 '07 #4

Post your reply

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