UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Are Queries allowed on Query Tables?    
 
   
scole
post Jul 5 2006, 01:04 PM
Post #1

UtterAccess Member
Posts: 22
From: Everett, WA



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.

Thanks!
Go to the top of the page
 
+
fkegley
post Jul 5 2006, 01:06 PM
Post #2

UtterAccess VIP
Posts: 23,583
From: Mississippi



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.
Go to the top of the page
 
+
ScottGem
post Jul 5 2006, 01:09 PM
Post #3

UtterAccess VIP / UA Clown
Posts: 25,205
From: LI, NY



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.
Go to the top of the page
 
+
scole
post Jul 5 2006, 02:42 PM
Post #4

UtterAccess Member
Posts: 22
From: Everett, WA



Ok, thanks.

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.

Thanks again.
Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 19th June 2013 - 01:37 PM