Re: ComboBox
- From: Vincent Johns <vjohns@xxxxxxxxxxxxxxxxxx>
- Date: Wed, 07 Sep 2005 22:53:48 GMT
John Vinson wrote:
On Tue, 6 Sep 2005 18:29:55 +0100, "Chris" <a@xxxxx> wrote:
Hello All, this question is hard to explain but my application uses the combobox in 6 different locations so please bare with me.
My combobox is based on a query that links 5 tables together.
This causes messy results that are hard to understand .e.g. master table and 2 dependent tables. one of the dependent tables has 7 entries for one entry in the master table. I was hoping that, if I had 7 entries for the other table all the values would be next to each other in the combo box. However, the query shows the 7 entries as 49 entries because of the table structure.
can a combo box have two different record sources?
Terrible explanation I know, but without I diagram I can't explain it.
Oh Well it never hurt to ask.
[...]
Why is the Combo Box based on such a complex query? Normally a combo is used to look up data in a relatively simple query, to update a field in some other table; how are you using it here?
John W. Vinson[MVP]
Another thought (suggested by that 49) -- I suspect that you've inadvertently asked for the Cartesian product of the table with itself. This means that, for every record in the first (copy of the) table, you match it with all of the records in the second (copy of the) table.
Sometimes you want to do that, most of the time you don't. In the query you're using as the data source for the control, be sure that you haven't included the table twice, at least not without specifying the correct Relationship between them.
Queries can do marvelous things, such as allowing you to avoid keeping redundant information in tables, but as with much of computer programming, keeping your system as simple as possible (consistent with doing the job) is a good goal.
-- Vincent Johns <vjohns@xxxxxxxxxxxxxxxxxx> Please feel free to quote anything I say here.
.
- References:
- ComboBox
- From: Chris
- Re: ComboBox
- From: John Vinson
- ComboBox
- Prev by Date: Re: 1 cent problem
- Next by Date: Compositkey dilema...
- Previous by thread: Re: ComboBox
- Next by thread: Query Average
- Index(es):
Relevant Pages
|