|
-
Mar 23rd, 2000, 12:29 AM
#1
Thread Starter
Addicted Member
following is an example of a table join where both tables are in the same Access database (ONE.MDB.)
Set dbs = Workspaces(0).OpenDatabase(App.Path & "\ONE.mdb")
strSql = "UPDATE Table_1 INNER JOIN Table_2" _
& "ON Table_1.SSN = Table_2.SSN " _
& "SET Table_1.SomeValue = 1, "
& "WHERE (((Table_1.SSN)= 555555555));" _
dbs.Execute strSql
dbs.Close
What I want to do is to create two access databases (ONE.MDB and TWO.MDB). I want ONE.MDB to have TABLE_1 in it and I want TWO.MDB to have Table_2. Now, how do I run the above code to join the tables?
My thought is you do something like this:
Set dbs = Workspaces(0).OpenDatabase(App.Path & "\ONE.mdb")
Set dbs2 = Workspaces(0).OpenDatabase(App.Path & "\TWO.mdb")
But I am not sure how you write the SQL statement?????????
Thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|