Thread: Query help
View Single Post
  #4  
Old June 3rd, 2010, 05:53 PM posted to microsoft.public.access.gettingstarted
John W. Vinson
external usenet poster
 
Posts: 18,261
Default Query help

On Tue, 1 Jun 2010 20:48:01 -0700, Richard
wrote:

I have a form with (2) textboxes StartDate & EndDate also a command button.
When the command button is pressed a query captures the (2) dates and then
displays the correct results. I would like to see the results in a listbox
instead of a query window. The code behind the button is wizard created:

DoCmd.OpenQuery "Qcalendar", acViewNormal

Thanks


In that case, don't open the query at all; instead, set the Listbox's
Rowsource property to the name of the query:

Me!listboxname.RowSource = "QCalendar"

You might need to then requery the listbox.

--

John W. Vinson [MVP]