Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Filiter Selection....

Status
Not open for further replies.
Aug 17, 2000
23
US
I have two tables. Paper and Paper Type. For the paper
table I created a subform and placed it on a tab control.
I would like to filter the form using the Paper Type table
as a combo box.

....Do I have to create a query?

What is the best solution to this problem??? Your help
would be greatly appreciated!!!

 
Do your two tables, "Paper" and "PaperType," have a common field? If not, you need to create a common field and create a join between the two tables on that field in the relationships window.

Then, when you add the subform for "Paper" to your mainform for (I assume) "PaperType," you can simply use the subform wizard selecting the option: "find a record based on the value selected in my combobox."

You will need to delete your current subform in order to add a new subform using the wizard after you've created the relationship between the two tables.

lastout (the game's not over till it's over)
 
I understand what you are saying. My tables are linked by
TYPEID. However, when I recreate the subform - it does
not prompt with "find record based on the value selected
in combobox"

....I'm not sure if I'm implementing it correctly?

Please advise... Thanks in advance...

 
On your subform's Data, LinkChildFields and LinkMasterFields Properties, what do they say? They should have the value "TypeID" in both. lastout (the game's not over till it's over)
 
Yes, you're right, I made a mistake about the "find record based on value selected in combobox." We're not talking comboboxes here. My mistake. But do check the child and master fields in the subform's properties to make sure your main form and your subform are linked on TypeID. Let me know the results. lastout (the game's not over till it's over)
 
Having difficulites. When I plug in TYPEID in
"linkchildfields and masterfields" and then run
the form - it prompts with "TYPEID?" When I complete
the response all the records for paper are listed
in the subform. There is no functionality in the
combox - other than the selections.

I believe both controls are still unbound.

info - both the subform and the combox are placed on
the tab control. And the tab control is place on the
mainform.

.....What is the order of placement of the controls?
subform and then combox? or vice versa...


Thanks again
 
If it prompts you for TypeID, it makes me think that TypeID might not be included on one of the forms (main or sub).

When you create your PaperType form, select all the fields you need, including TypeID (later you can make it invisible on the form if you want). Then when you add the subform for Paper, select whatever fields you want being sure to include TypeID there as well. If you use the wizard to create your subform, the 3rd window will prompt you for the TypeID link. Otherwise you set the child and master link fields in the subform's Property sheet.

When you've got that working, then try adding a combobox for PaperType using the combobox wizard. Make sure to choose the option "find a record based on the value I selected in my combobox" in the 1st window of the wizard. Then finish the rest of the steps.

That should work. If it doesn't, let me know. lastout (the game's not over till it's over)
 
Your solution works! I can select PaperType via (Textbox)
and have the results properly displayed in the subform
(tblPaper)

I then created a COMBOBOX and was able to get the
desired results!!!!!!!!

THANKS FOR HELPING!!!!!!!!!!!!!!! I REALLY APPRECIATE!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top