If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
Query help
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 |
#2
|
|||
|
|||
Query help
=?Utf-8?B?UmljaGFyZA==?= 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 Let the query be the RowSource of your listbox and change the code behind the button to: Me.YourListbox.Requery -- Groeten, Peter http://access.xps350.com |
#3
|
|||
|
|||
Query help
Why do you want to see the resukts in a listbox? Do you want to select an
item i the listbox and do something else? Steve "Richard" wrote in message ... 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 |
#4
|
|||
|
|||
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] |
Thread Tools | |
Display Modes | |
|
|