I am quite familiar with typical Form/SubForm logic when working with forms. That has a strict hierarchical logic. I can also make a custom query to generate a table of ids and labels, use these in a list box to pick values/linking entries based on the relationships.
But let’s assume this simple example:
Clients table with id, name …
Addresses table with id, street, client_id …
invoices table with id, client_id, address_id, …
Now, I have clients form and addresses subform, linked with Clients.id/Addresses.client_id fields.
I also have an invoices subform under clients, linked with Clients.id/Invoices.client_id fields.
Now, for each invoice entry (in the invoice subform), I would like to pick from client addresses in listbox and use that address id in the invoice table. Here, we are breaking this strick hierarchical logic. Now, we have 2 separate relationships in our logic.
- between clients and addresses
- between invoices and addresses
I tried the filter under listbox, but it only accepts fixed values. For instance, I can’t use the main form (clients) id field to filter results.
I wonder, if there is any way to accomplish this without Macros?