From: PhatAdo on
I have several tables and I'm having a problem with my last one. I have two
columns in this table, 'License', which are populated using combo boxes, and
these combo boxes are populated from using queries on other tables:

I have an 'Entitlement' table with has and Entitlement ID (different to it's
primary Key ID). For each entitlement there can be one or more templates and
so I have a 'Template' table with a 'Template ID'. As it happens a template
can also be in one or more entitlements so there is also an
'Entitlement-Template' table to manage the many to many link.

My license table has both the 'Entitlement ID' and the 'Template ID' and
what I want is that in any row, once you have selected an 'entitlement ID'
that automatically the 'Template ID' column only populates with the Template
IDs that are associated with that particular Entitlement.

I have a query that returns the Template IDs that are associated with the
Entitlements, but that is a large list and not all of those Templates are
associated with each entitlements. At the moment you can select an
Entitlement ID, but when you go to chose a Template ID you can choose from
the whole list.

I know how to enter a criteria for a query of an exact value – but I don't
know how to create a query on a table that is based on the current value of
another column in the same row in that table – or indeed if this is possible.

I do hope I've made this clear!!

Cheers,
A

From: KARL DEWEY on
>>I do hope I've made this clear!!
No it is not. Below I tried to put your words to show table structure. Let
me know if I got it correct or fix any errors.

License –
EntitlementID –
TemplateID -

Entitlement –
-ID – primary key
EntitlementID –

Template –
TemplateID –

Entitlement-Template –
EntitlementID –
TemplateID –

License has the same fields as Entitlement-Template so why need second table?

>>'License', which are populated using combo boxes,
How do you use a combo to populate a field in a table? Are you using a form
or are they look-up fields?

--
Build a little, test a little.


"PhatAdo" wrote:

> I have several tables and I'm having a problem with my last one. I have two
> columns in this table, 'License', which are populated using combo boxes, and
> these combo boxes are populated from using queries on other tables:
>
> I have an 'Entitlement' table with has and Entitlement ID (different to it's
> primary Key ID). For each entitlement there can be one or more templates and
> so I have a 'Template' table with a 'Template ID'. As it happens a template
> can also be in one or more entitlements so there is also an
> 'Entitlement-Template' table to manage the many to many link.
>
> My license table has both the 'Entitlement ID' and the 'Template ID' and
> what I want is that in any row, once you have selected an 'entitlement ID'
> that automatically the 'Template ID' column only populates with the Template
> IDs that are associated with that particular Entitlement.
>
> I have a query that returns the Template IDs that are associated with the
> Entitlements, but that is a large list and not all of those Templates are
> associated with each entitlements. At the moment you can select an
> Entitlement ID, but when you go to chose a Template ID you can choose from
> the whole list.
>
> I know how to enter a criteria for a query of an exact value – but I don't
> know how to create a query on a table that is based on the current value of
> another column in the same row in that table – or indeed if this is possible.
>
> I do hope I've made this clear!!
>
> Cheers,
> A
>