What do you want to happen when you "run" the query? If you want to assign
it to the Row Source of the listbox, then the code would be placed in the
button's OnClick event procedure and look something like:
Me.lstNameOfListbox.RowSource = Forms!Form1!Item
Replace Me with Forms!NameOfForm if the code isn't running on the same form
as the listbox.
--
Wayne Morgan
"Alan" <mra2@mindspring.com> wrote in message
news:f828591c.0310221058.56bd4e6f@posting.google.c om...[color=blue]
> I created a Multi Select list box.
>
> I even got the code to create the SQL statement in a control called Item.
> Forms!Form1!Item
>
> Here is a sample of what appears in Item:
> Select Name, activity from Table1 where [activity]=MA OR [Activity]=MW ;
>
> I have a button called button1
> Forms!Form1.Button1
>
> What is the code that I have to attach to button1 to run the query????
>
> Thanks,
> AlanA
>
Abramowitza@coned.com[/color]