Page 1 of 1

[Solved] Automatically applying filters to table controls

PostPosted: Mon Oct 08, 2018 4:13 am
by heebiejeebies
Hi all,

I’ve googled the crap out of this and still can’t seem to find an answer to this anywhere - hope someone can help me.

I have a simple database which currently contains two forms: a form to manage a table which contains a list of boxes, and a form to manage a table containing the list of items in those boxes. The item form is linked to the box list table through a drop down menu - i.e. When you’re entering in a new item, you have to choose which box it is in, and the box drop-down field refers to the box table to get its information.

On the box management form, I need a field that displays all the items that are in that box. It appears I have two options, but neither of them are working properly at the moment.

Preferred option: use a table control to pull the data. This would be preferred because it allows me to also display other fields from the item table, such as whether the item is checked in/checked out etc. But if I go with this option, it displays everything from the Item Description field, regardless of which box it’s in. I need it automatically filtered to only show the items that are in the current box.

If that’s not possible, I guess the other option is to use a list field to grab the data from the “Item Description” field of the item table. When I try this I have the same issue - it grabs all of it instead of only grabbing the items in the current box. I was going to explain how I set this field up so you can see where I'm going wrong but it’s too confusing to type it out in words.

Any ideas on how to do this?
Thanks very much

Re: Automatically applying filters to table controls

PostPosted: Mon Oct 08, 2018 5:05 pm
by UnklDonald418
It sounds like a MainForm/SubForm combination would be the answer. The SubForm would display the contents of the box selected on the MainForm.
If that doesn't help, perhaps you could upload a sample database.
[Forum] How to attach a document here

Re: Automatically applying filters to table controls

PostPosted: Wed Oct 10, 2018 1:15 am
by heebiejeebies
Thanks, that worked! I just had to make the table control part of a subform then set up a master/slave form relationship. The list form still didn't filter for some reason but who cares, I prefer the table control anyway.