Ask Your Question
0

How can I use a filter list box in a subsubform?

asked 2020-09-10 18:35:04 +0200

jderica gravatar image

I want to use a main form for a project, that shows records from table1, table2 and table3, with filter options for the records of table 1 and 2; also the tables are linked with relationship, table1 with table2 and table2 with table3.

I've setup the filter list box for table 1, so now the form navigator is something like filter>table1>table2>table3 (each being a subform of the previous one).

Now I can't get the list box filter for the records of table 2 to work. At first I tried using a second filter table, in the same manner as with table1, but that doesn't seem as a good idea anymore. For the second attempt, I tried to use an extra column in the main filter (instead of an extra filter table) and also change the content type of table2. But I still can't get the second filter list box to show only records relevant to the table1 selected record.

C:\fakepath\test2.odb

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2020-09-10 21:35:24 +0200

Ratslinger gravatar image

Hello,

It took a bit but deciphered the form. You started out in one direction: List Box to select company, Company based upon list box selection, Employee based upon company and salary based upon employee. Most were connected using links between forms. All fine and proper.

Now you still want basically the same process but instead of using the navigator to select an employee record you wish to do this with a list box.

To accomplish you need to change the structure. Created new sub form under companies - SelectEmployee. Moved Employee list box there and employee and salary sub forms under that. Changed the link between forms. Changed Employee sub form to look at table not SQL. Also check miscellaneous items. May have changed an item or two not specifically mentioned.

Sample ----- SubFormChange.odb

edit flag offensive delete link more

Comments

I took a look at what changes you did there. It's mostly working how I had it in my mind, thank you! But is there a way to also grab de ID_COM when I add a new employee and store it in FK_COM? One way I noticed it works is by having "Link Master/Slave Field" to "ID_COM/FK_COM", but ofcourse. that is only possible with the employee form as a subform of the companies form.

jderica gravatar imagejderica ( 2020-09-10 22:54:21 +0200 )edit

Since Employees is no longer a sub form of companies, this cannot be automatic. It is possible with coding a macro.

Ratslinger gravatar imageRatslinger ( 2020-09-10 23:02:26 +0200 )edit

Do you happen to know any links or even a macro for this function then? In the meantime, I'm going to keep trying to find a workaround using the form controls.

jderica gravatar imagejderica ( 2020-09-11 10:06:55 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2020-09-10 18:35:04 +0200

Seen: 61 times

Last updated: Sep 10 '20