My code is comparing 2 tables, a Master Data table and a Raw Data table to find any discrepancies between them. Then I create an output table "TableDiscrepancies" to display the discrepancies.
In the beginning of my code I delete a table: dbs.TableDefs.Delete "TableDiscrepancies"
and then re-add it: dbs.Execut("CREATE TABLE TableDiscrepancies(Field1 TEXT, Field2 TEXT);")
and this works fine. Then I run the body of the code that does the checks between the tables. If there is a discrepancy then I set variables Field1 as the key and Field2 as the Field with the Discrepancy.
Now I want to output this to "TableDiscrepancies" and I've written the code like this:
dbs.Execute("INSERT INTO TableDiscrepancies(Field1)" & "The discrepancy is " & Field2"
This obviously is incorrect because I'm getting a Syntax error and it doesn't work and I'm having trouble finding how to write it correctly and make it work. Can anyone show me the err of my ways? Thanks for any assistance.
[This message has been edited by Mendel (edited 12-12-2001).]
In the beginning of my code I delete a table: dbs.TableDefs.Delete "TableDiscrepancies"
and then re-add it: dbs.Execut("CREATE TABLE TableDiscrepancies(Field1 TEXT, Field2 TEXT);")
and this works fine. Then I run the body of the code that does the checks between the tables. If there is a discrepancy then I set variables Field1 as the key and Field2 as the Field with the Discrepancy.
Now I want to output this to "TableDiscrepancies" and I've written the code like this:
dbs.Execute("INSERT INTO TableDiscrepancies(Field1)" & "The discrepancy is " & Field2"

This obviously is incorrect because I'm getting a Syntax error and it doesn't work and I'm having trouble finding how to write it correctly and make it work. Can anyone show me the err of my ways? Thanks for any assistance.
[This message has been edited by Mendel (edited 12-12-2001).]