[Solved] Automatically applying filters to table controls

Creating tables and queries

[Solved] Automatically applying filters to table controls

Postby heebiejeebies » Mon Oct 08, 2018 4:13 am

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
Last edited by heebiejeebies on Wed Oct 10, 2018 1:16 am, edited 1 time in total.
OpenOffice 4.1 on Ubuntu
heebiejeebies
 
Posts: 2
Joined: Mon Oct 08, 2018 4:07 am

Re: Automatically applying filters to table controls

Postby UnklDonald418 » Mon Oct 08, 2018 5:05 pm

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
If your problem has been solved, please edit this topic's initial post and add "[Solved]" to the beginning of the subject line
Apache OpenOffice 4.1.6 & LibreOffice 6.1.5.2 - Windows 10 Professional
UnklDonald418
Volunteer
 
Posts: 1238
Joined: Wed Jun 24, 2015 12:56 am
Location: Colorado, USA

Re: Automatically applying filters to table controls

Postby heebiejeebies » Wed Oct 10, 2018 1:15 am

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.
OpenOffice 4.1 on Ubuntu
heebiejeebies
 
Posts: 2
Joined: Mon Oct 08, 2018 4:07 am


Return to Tables & Queries

Who is online

Users browsing this forum: No registered users and 2 guests