Here's the situation: I click a button on a form and this fires a query nicely. The thing is, I want the query results to be added to a listbox. Does anyone know a suitable technique?
Set the RowSource of the list box to the query SQL source
Does the button that 'fires' the query change the code of the query? If so then if you have the SQL string assign it to the rowsource of the listbox. Else:
'CODE ON FORM
set qdfTemp = currentdb.querydef("QueryName")
me.lstBoxName.RowSource = qdfTemp.SQL
BTW - my main experience is in Oracle and DB2 so this Access stuff is really quite different to me! Can you recommend a decent book on the VBA side of things? All the Access books i've seen just seem to spend their time telling you how to use wizards etc - and I'm much more keen to program the thing for myself!!