Query - Listbox

H

hedylogus

On one form, I would like to have an option group to select one of
three queries to run, then have that query's results displayed in a
subform in datasheet format. I can get the queries to run, but I can't
get them to display in the listbox (they appear in popup windows). Any
ideas?
 
J

Jeff Boyce

Have you tried setting the source of the subform to the query selected?

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
G

Guest

If you want the query results to appear in a listbox, you have to assign the
RowSource property to the query and then requery the listbox. You can add a
button that does this. Do all three queries have the same columns?

The erason why they appear in separate windows is probably because you use
the OpenQuery command.

You'll need to programmatically assign the query to the listbox if you want
them to appear in the listbox.

Ray
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

change to SQL - where and what? 1
Listbox query 3
Insert query in a form 2
Updating a query criteria from a listbox 2
Access Cannot select items in listbox 1
ListBox help 1
Requery listbox 1
Parameter Value error in a Subform 0

Top