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

Limit Sub Form records based on Main Form

P: n/a
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.

Thanks in Advance
Gary
Sep 25 '08 #1
Share this Question
Share on Google+
6 Replies


P: n/a
BEETHOVEN wrote:
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.

Thanks in Advance
Gary
Forms!MainFormName!SubFormName.Form.Filter = _
"Issue_Type = " & Me.Issue_Type
Forms!MainFormName!SubFormName.Form.Filter = True
Sep 25 '08 #2

P: n/a
Salad wrote:
BEETHOVEN wrote:
>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.

Thanks in Advance
Gary


Forms!MainFormName!SubFormName.Form.Filter = _
"Issue_Type = " & Me.Issue_Type
Forms!MainFormName!SubFormName.Form.Filter = True
Oh yeah, I forgot. Put that in your AfterUpdate event of the
OptionGroup frame name and be sure the names reflect the names of the
forms and controls you use.
Sep 25 '08 #3

P: n/a
open the main form in Design view and click once on the subform to select
it. in the Properties box, add the control name Issue_Type to the
LinkMasterFields property, and add the name of the issue type field (from
the subform's RecordSource) to the LinkChildFields property.

hth
"BEETHOVEN" <gr*****@sbcglobal.netwrote in message
news:7f**********************************@p25g2000 hsf.googlegroups.com...
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.

Thanks in Advance
Gary

Sep 26 '08 #4

P: n/a
On Sep 25, 4:39*pm, Salad <o...@vinegar.comwrote:
BEETHOVEN wrote:
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.
Thanks in Advance
Gary

Forms!MainFormName!SubFormName.Form.Filter = _
* * * * "Issue_Type = " & Me.Issue_Type
Forms!MainFormName!SubFormName.Form.Filter = True- Hide quoted text -

- Show quoted text -
Hello Salad

Below are the 2 options I tried:
Forms!F1_Member_Demographics_Main!F2_Member_Issues .Form.Filter =
"Issue_Type = " & Me.Issue_Type
Forms!F1_Member_Demographics_Main!F2_Member_Issues .Form.Filter = True
or
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

Neither one does anything to the form. It still shows all records. The
option group (Issue_Type) data is not stored in any table but the
combo box (Issue_Code_T1) data is. Can you see what I am doing wrong?

Thanks
Gary
Sep 26 '08 #5

P: n/a
BEETHOVEN wrote:
On Sep 25, 4:39 pm, Salad <o...@vinegar.comwrote:
>>BEETHOVEN wrote:
>>>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.
>>>Thanks in Advance
Gary

Forms!MainFormName!SubFormName.Form.Filter = _
"Issue_Type = " & Me.Issue_Type
Forms!MainFormName!SubFormName.Form.Filter = True- Hide quoted text -

- Show quoted text -


Hello Salad

Below are the 2 options I tried:
Forms!F1_Member_Demographics_Main!F2_Member_Issues .Form.Filter =
"Issue_Type = " & Me.Issue_Type
Forms!F1_Member_Demographics_Main!F2_Member_Issues .Form.Filter = True
or
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

Neither one does anything to the form. It still shows all records. The
option group (Issue_Type) data is not stored in any table but the
combo box (Issue_Code_T1) data is. Can you see what I am doing wrong?

Thanks
Gary
The field name is Issue_Code_T1. Is that correct?
The option group is called Issue_Type. Is that correct?

If both are true then the second set should work. The question
is...where'd you put the code? Do you have it in the AfterUpdate event
of the option group Issue_Code_T1? Also, your references should be the
values in the Name of the field object (Other tab).
Sep 26 '08 #6

P: n/a
On Sep 26, 2:36*pm, Salad <o...@vinegar.comwrote:
BEETHOVEN wrote:
On Sep 25, 4:39 pm, Salad <o...@vinegar.comwrote:
>BEETHOVEN wrote:
>>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.
>>Thanks in Advance
Gary
>Forms!MainFormName!SubFormName.Form.Filter = _
* * * *"Issue_Type = " & Me.Issue_Type
Forms!MainFormName!SubFormName.Form.Filter = True- Hide quoted text -
>- Show quoted text -
Hello Salad
Below are the 2 options I tried:
Forms!F1_Member_Demographics_Main!F2_Member_Issues .Form.Filter =
"Issue_Type = " & Me.Issue_Type
Forms!F1_Member_Demographics_Main!F2_Member_Issues .Form.Filter = True
or
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
Neither one does anything to the form. It still shows all records. The
option group (Issue_Type) data is not stored in any table but the
combo box (Issue_Code_T1) data is. Can you see what I am doing wrong?
Thanks
Gary

The field name is Issue_Code_T1. *Is that correct?
The option group is called Issue_Type. *Is that correct?

If both are true then the second set should work. *The question
is...where'd you put the code? *Do you have it in the AfterUpdate event
of the option group Issue_Code_T1? *Also, your references should be the
values in the Name of the field object (Other tab).- Hide quoted text -

- Show quoted text -
I am getting lost on where to put the code. I put the code in the
Option Group-Issue_Type on after update on the main form-
F1_Member_Demographics_Main. I am not sure what you mean by "Also,
your references should be the values in the Name of the field object
(Other tab)."

Thanks
Gary
Sep 29 '08 #7

This discussion thread is closed

Replies have been disabled for this discussion.