Pete
Thanks for greater detail -- it's tough offering specific advise on general
questions!
First thing to consider is to work in forms, not directly in the tables
(tables store data, forms display it).
Take a quick scan through the tablesdbdesign newsgroup on the topic of
lookup fields. You'll find a STRONG consensus against using them in table
definitions, for the reason in my previous post.
I assume your Main and ProductList tables connect on a field that is a
LongInt. In Main, it is an Autonumber, right? But in ProductList, it is a
LongInt, right??
To do the filtering your original post suggesting, use a form. Put a combo
box in the form that lists Product types. In the AfterUpdate event of that
combo box, requery a listbox. The listbox uses a query that lists
Companies, but uses, as a criterion, a "product" ... which you get from
referring to the form! Use something like (your syntax may vary):
Forms!frmYourForm!cboYourComboBox
as the criterion for the query that underlies a listbox on frmYourForm.

Signature
Good luck
Jeff Boyce
<Access MVP>
> Jeff,
>
[quoted text clipped - 15 lines]
> Cheers,
> Pete
Foss - 15 Mar 2005 17:23 GMT
Jeff,
Too true! Thanks for the assistance, it's much appreciated!
Right, I've taken off all the lookup things from any tables. They only
happen in forms now.
All the fields that are used in joins are longints, except the one
autonumber of course!
I'm not sure if your suggestion will fit what I'm trying to do. Although to
be honest, that may have a lot to do with the fact that I'm getting a little
over my head!!
I've got a form called ChooseType. All it's got on it is a drop down with
all the products, and a button.
What I'm trying to work towards, is that when that button is pressed, the
existing contact details form will open. The only difference should be that
only the companies dealing with the product are displayed.
So I suppose, come to think of it, I need a WHERE statement, that I can put
on the form. I've just given that a try but I can't get it right at all.
This is what I used as the form filter: KompassDimension.[ProductType]="Fruit"
Any idea why this doesn't work?
Cheers,
Pete
> Pete
>
[quoted text clipped - 42 lines]
> > Cheers,
> > Pete
Jeff Boyce - 18 Mar 2005 03:12 GMT
Pete
Not sure I quite understand yet -- let me try this...
If a user selects a "Produce", you want them to see all Companies offering
that product.
If so, one way to do that is to put an unbound combo box in the header of
the form. This combo box only shows products. The form itself shows
Companies, but only shows Companies for the selected product. You do this
by building a query that uses a parameter for the Product, and in the
criterion, you "point" to the form's combo box to get the Product. The
query criterion looks something like:
Forms!frmYourForm!cboYourComboBox
Hope that helps!
Jeff Boyce
<Access MVP>
> Jeff,
>
[quoted text clipped - 72 lines]
> > > Cheers,
> > > Pete