Relationship - Tables

Relationship - Tables

am 24.10.2007 18:04:34 von learning_codes

Hi,

I need your help. I created a relationship on four tables. It
works nicely. Each table has a code type.


Group A Table
--- Field Name: Code Type "T"

Group B Table
--- Field Name: Code Type "V"

Group C Table
--- Field Name: Code Type "C"

Group D Table
--- Field Name: Code Type "D"

tbl_CodeType
--- Field Name: Type
--- Field Name: Result
--- Field Name: RelatedType

I create a query and select three tables (Group A, Group B and
tbl_CodeType). In one query, I set a link Group A: Code Type to
[tbl_CodeType].TYPE and also set a link Group B: Code Type to
[tbl_CodeType].RELATEDTYPE. I want to set the combo by selecting
two fields "T" and "V" from two tables and get the output from
tbl_CodeType: Field Name: Result. The result is that I am getting
error.

I would be more happy if you give me some help to make it work.

Thanks a million.

Re: Relationship - Tables

am 24.10.2007 18:55:29 von Salad

learning_codes@hotmail.com wrote:

> Hi,
>
> I need your help. I created a relationship on four tables. It
> works nicely. Each table has a code type.
>
>
> Group A Table
> --- Field Name: Code Type "T"
>
> Group B Table
> --- Field Name: Code Type "V"
>
> Group C Table
> --- Field Name: Code Type "C"
>
> Group D Table
> --- Field Name: Code Type "D"
>
> tbl_CodeType
> --- Field Name: Type
> --- Field Name: Result
> --- Field Name: RelatedType
>
> I create a query and select three tables (Group A, Group B and
> tbl_CodeType). In one query, I set a link Group A: Code Type to
> [tbl_CodeType].TYPE and also set a link Group B: Code Type to
> [tbl_CodeType].RELATEDTYPE. I want to set the combo by selecting
> two fields "T" and "V" from two tables and get the output from
> tbl_CodeType: Field Name: Result. The result is that I am getting
> error.
>
> I would be more happy if you give me some help to make it work.
>
> Thanks a million.
>
You can use TOP to get the top 2 records. And you might want to do a
UNION query.
Select * From Table1 Where Type = "A"
UNION ALL
Select * From Table2 Where Type = "B"

I don't know if the above addresses your situation.