On my form I have a button that runs a search query - I want to display the results of the query on my form for my further manipulation on a listbox. how can i do this??
You can put the query name as the RowSource for your listbox and it will display the columns for selection. When you say manipulation you will have to explain more if you want recommendations concerning how to do whatever you want to do to the recordset. List boxes basically just display recordsets. A SubForm control displays in a continuous form all the rows of a recordset(table/query). If you want to change data in a recordset then a listbox is not the way to go but rather use a subform.
you see if i put the query in rowsource of the listbox as described - the query textbox appears as soon as the form is opened which i dont want..... i want to press a button on the form to run the query and have the results displayed in table format on the form.
Yes, you can have that happen. Lookup and see how to create a subform and a subform control on your main form. By creating an underlying continuous type subform you can display the rows of records like they are being displayed when you open a table in datasheet view. You can remove the form from the subform control to start the form out. Then a click of the command button we can put code in to reinsert the form designation in the subform properties and display the selected records.
My question is Why??. What are going to do between the opening of the form and the displaying of the records?
Please post back with a discussion of how and what you want this form to do. Then we can give you some proven techniques to use.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.