Jul 5 2006, 01:04 PM
Just want to confirm that this is allowed.
I have a couple of listboxes on a form and they're pulling information from a Query Table I have constructed. The query table basically combines 3 seperate tables together- 1 main table & 2 others which are essentially "look up" tables (value & description).
Now, let's say the records in the query table can either be A,B, or C. For display on the form, I want to display the A.B,C values group individually so I have 3 listboxes- one for the A values, one for the B values, and one for the C values.
So, when it comes to each listbox, the RecordSource is my query table and the RowSource is something like "SELECT * from qryTable WHERE type = 'A'".
I just want to verify that using a SQL SELECT statement & RowSource on a query table is allowed. I ask because sometimes I'm getting additional values in the listbox which shouldn't be in there.
Jul 5 2006, 01:06 PM
Yes, that is allowed. I can't imagine what the trouble could be.
What you might want to do tho is set the Row Source of the second combo box to "" BEFORE you update it. It will keep previous values in the list unless you do this.
Jul 5 2006, 01:09 PM
Queries and Tables are two different things. A Query is simply a SQL statement that defines what data to pull from a table. Queries can be nested so that you can use a query as the source for another query.
A RowSource of a listbox can also be an SQL statement and it can be based on a table or a query as necessary.
A RecordSource is applicable to a form or report and has nothing to do with the rowsource of a list or combo. it is also an SQL statement that can be a table or query.
Hope this clarifies things for you.
Jul 5 2006, 02:42 PM
It looks like my joins are set up incorrectly in the Query Design View. Thankfully, I'm working with a small set of data right now so I was able to see that I have more records in Datasheet View than I should. I haven't fixed it yet but looks like I know where the problem is now.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here