Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Displaying query results in a listbox

Status
Not open for further replies.

Maldini

Technical User
Nov 10, 2002
55
GB
Hi,

Is there anyway to display the results of a query in a listbox, whilst not having the standard query results screen popping up?
Also, any idea on how to clear the contents of a listbox on form load? Since there doesn't seem to be a clear method for the listbox...

Thx
Maldini
 
Copy the SQL code for your query into the listbox's Row Source property.

In Query Design view select VIEW|SQL VIEW from the toolbar. Copy the SQL code to the clipboard. Open your form, select the listbox and Paste the code into the Row Source property.

This will also run the query every time the form is opened, so the listbox will always open with the up-to-date query results displayed.

HTH
Lightning
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top