Limit Sub Form records based on Main Form

B

BEETHOVEN

I have an option group called Issue_Type on my main form
F1_Member_Demographics_Main. When I select one of the 3 options on the
main form from the option group Issue_Type I want to limit the sub
form F2_Member_Issues records based on the combo box Issue_Code_T1.

Option Group Issue_Type on main form:
1=Complaint
2=Grievance
3=Appeal

Combo Box on sub form:
1=Complaint
2=Grievance
3=Appeal


So if I select Complaint from the option group on the main form I only
want to see Complaints on the sub form etc.

Below is some code that someone gave me. I put the code in the After Update
on the option group Issue_Type but I still get all the records on the subform:

Forms!F1_Member_Demographics_Main!F2_Member_Issues.Form.Filter = _
"Issue_Code_T1 = " & Me.Issue_Type
Forms!F1_Member_Demographics_Main!F2_Member_Issues.Form.Filter = True

Any suggestions
Thanks
Gary
 
N

NetworkTrade

in general terms; an Access form does not dynamically change - it pulls in
data when it opens and stays with that data; thus your filter may work (I
can't really tell) but you must still refresh/requery that object so it will
go get a new set of data

this is more or less true for combo boxes and subforms

so be sure to refresh/requery objects tactically when you want to
dynamically alter data in a form depending on user activity....usually using
the 'AfterUpdate' event

if you key word search your object with these key words you will see alot of
Q/A on this
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top