Dead easy if you know how I’m sure, 1 list box, 1 bound column, how do I retrieve data from another column,
My problem,
A selection list has multiple items, and 3 columns, UID, Name & orderno I use UID to filter items in a table I need to filter the items by the orderno too, how?
ta
Damski
[QUOTE=Damski;382840]Dead easy if you know how I’m sure, 1 list box, 1 bound column, how do I retrieve data from another column,
My problem,
A selection list has multiple items, and 3 columns, UID, Name & orderno I use UID to filter items in a table I need to filter the items by the orderno too, how?
ta
Damski[/QUOTE]
use the after_update method to set the rowsource of the table.
urm
maybe i misread.
You have a dropdown list on a form?
And you want to re-order by orderno, the UID?
(I’m guessing UID is a primary key - so ordering by this first won’t change the list order)
I have a list box, which pulls it’s values from a table, I have a second table whhich I want to filter by 2 values that are contained in the list box.
pah, got fustrated and did it another way. never mind
Ok just to show answer…List Box 1 then you make a TextBox or variable to hold the result. So Then listbox.column(1) “Column one would have result” is sent to the textbox or variable. Then from there you have an after event to set the SQL statement to that variable or textbox.
Like this:
Dim A as String
Dim B as String ’ SQL Statement
A = listbox.column(1).Value
B = SQL Statement where A…etc
The maybe you would have a button to filter on that so you can show results pointing at the listbox variable.
Hope that helps for others since you did already sort it out.
Step, that is a much neater solution than the one I came up with, but hey, and as ever now I know this tip is here no doubt I’ll use it next time round. Thank you.
OK, back to this, I’m trying to use the entries from the list box to filter data from a table, I can’t for the life of me get it to do it, refrencing the list from the query builder fails if there’s more than one entry, trying to build the query from code is a non starter as I don’t know how to get the data out (and it keep saying I haven’t built the query corectly).
the table is just 3 colums, the first is the users ID (text) the second is a course Id (number) the third is just a date. I list all the course details in the list box, I want to be able to select the courses and find the people who have done the courses. sounds simple dosent it! not!
if you can help I’ll love you for ever, I’m ripping my hair out!