I was making a form to lets the users pick each table then have a compare button to return the results into to sub forms. subform one shows common fields in both tables. subform2 has Table1 missing fields , and subform 3 has Table2 missing fields.
Example:
So both Table1 and Table2 have "Report" and "Date" fields.
Table1 does not have "Name" field
Table2 does not have the "Total" field.
Is there a way to make a SQL statement to show the differences?
I have this showing the fields that are the same.
DougP
Example:
So both Table1 and Table2 have "Report" and "Date" fields.
Table1 does not have "Name" field
Table2 does not have the "Total" field.
Is there a way to make a SQL statement to show the differences?
I have this showing the fields that are the same.
Code:
SELECT TableDefs.Fields FROM TableDefs " & _
"GROUP BY TableDefs.Fields " & _
"HAVING (((TableDefs.Fields) In (SELECT [Fields] FROM " & _
"[TableDefs] As Tmp GROUP BY [Fields] HAVING Count(*)>1 )));"
Me.TableDefs_Duplicate_Fields_subform.Form.RecordSource = SQLCompare
Me.TableDefs_Duplicate_Fields_subform.Requery
DougP