I have replaced a Table Control column with a List Box. I would like to filter the contents of the List Box by using an int field on the MainForm.
The SQL command I’d like to use is something like:
SELECT "street1", "address_id" FROM "addresses" WHERE "customer_id" = "MainForm.customer_id"
For my odb specifics, I’ve set up 3 tables: customers, addresses, and payment_methods. Each customer can have multiple addresses. One of the addresses needs to be assigned to a payment_method. The Form design is as follows:
MainForm
--- customer_id
--- other customer info...
--- SubForm: addresses
--- SubForm: payment_methods
Each of the SubForms are Table Controls. In the payment_methods Table Control, I’ve set up a List Box to select an address from the addresses table. When I click on the List Box, I would like it populated with ONLY the addresses related to the customer_id from the MainForm.
I’ve glanced through some of the threads on openoffice.org, including topics like cascading list boxes, filter tables, etc. TBH, it’s way over my head. My situation doesn’t seem nearly as complex as some of those examples. Hopefully, I just need to learn the proper syntax. Thanks in advance for help!