Joined: 30 Jan 2005
|Posted: Sun Jan 30, 2005 2:58 pm Post subject: How to parameter a LB in a subform with data from Main form
I'm working on OO since fews days trying to build some nice forms to work with my DB (MySql), but there's still a problem I can't fix :
My main Form is based on a table (say 'Table1')
My SubForm is based on a query('Query1') on an other table (say 'Table2') and of course I'm using a parameter from 'Table1' to param 'Query1' (named parameter). This works fine
Now the problem is that I have a ListBox in my SubForm and I want it to be populated using a sql query similar to :
select field1, field2 from `DB`.`table3` where field_param = :my_param
(NB : the selected value in the ListBox should be then stored in a field of the 'table2')
Of course the "where field_param = :my_param" of my query isn't working.
How can I link :my_param with a specific field of the main Form ? I've tried many tips but none is working
Thanks for help !