Compare 2 tables

  • Thread starter Thread starter kolbd
  • Start date Start date
K

kolbd

I have tried several ways to get this done and none seem
to work, can someone help?
I want to compare 2 tables, field to field, and if both
tables in that field are 'Yes' then I want Table three in
that field to = 'Yes'.
If one or the other tables fields is 'No' then the third
tables field will be 'No'.
I've tried queries, code, etc. Any help will be
appreciated.
Thanks
 
I have tried several ways to get this done and none seem
to work, can someone help?
I want to compare 2 tables, field to field, and if both
tables in that field are 'Yes' then I want Table three in
that field to = 'Yes'.
If one or the other tables fields is 'No' then the third
tables field will be 'No'.
I've tried queries, code, etc. Any help will be
appreciated.
Thanks

How are the tables related? Which record in Table1 should be compared
to which record in Table2? What fields actually exist in the tables -
is this one yes/no field in each table, or many?

The entire design seems rather non-normalized to me! It appears that
your third table is totally derived from the other two - and derived
tables are generally a bad sign.
 
I have 2 tables with several of the same fields. 1 table
shows a check mark in the fields that are required. The
other table shows a check mark in the fields that are
available. These tables are set up with queries so there
is only ever 1 record in each table.
I have to compare the fields from Table 1 'Requested
item' to Table 2 'Available item' and set the outcome
to 'Yes'if both are 'Yes'.
Does this help?
-----Original Message-----
 
I have 2 tables with several of the same fields. 1 table
shows a check mark in the fields that are required. The
other table shows a check mark in the fields that are
available. These tables are set up with queries so there
is only ever 1 record in each table.
I have to compare the fields from Table 1 'Requested
item' to Table 2 'Available item' and set the outcome
to 'Yes'if both are 'Yes'.
Does this help?

You mean that Table1 has ONLY ONE RECORD, and Table2 has ONLY ONE
RECORD, and you want to create a new one-record table?? This seems a
VERY strange way to work!

But ok...

Create a Query by adding both tables to the query design window, with
no join line. (This is normally a bad idea since it will give every
possible combination of records from the two tables, but if each table
has only one record that's what you want).

In sequential Field cells type

FieldXNew: [Table1].[FieldX] AND [Table2].[FieldX]

This value will be TRUE if FieldX is true in both tables, False
otherwise.

Repeat for the other fields.

Base your report directly on this query or (if you insist on doing
things the hardest possible way) change the query into a MakeTable
query.
 
Back
Top