knuddelsternchen
Registered User.
- Local time
- Today, 11:07
- Joined
- May 14, 2009
- Messages
- 11
Alrighty, so I dared to venture into the world of VBA coding, and have been RELATIVELY successful, but I'm stumped now. I have found many useful posts on this site, so I'm hoping someone will be kind enough to humor my (probably stupid and amateurish) question.
I wrote the following module for a database. It's supposed to update all records in Table1 for which the Test fields agrees between the two tables (Table1 and Table2) with the Update1, Update2, and Update3 fields from Table2. The reason that I have to create the join is that Table1 is to be imported via a previous step, so I don't have a pre-existing join.
DoCmd.RunSQL "Update Table1 LEFT JOIN Table2 ON Table1.Test = Table2.Test SET Table1.Update1 = Table2.Update1" & _
"Table1.Update2 = Table2.Update2" & _
"Table1.Update3 = Table2.Update3" & _
"Table1.Update4 = Table2.Update4;"
End Function
It works if I don't have to use the line continuation characters, but I'm getting the 3075 run-time error when I do.
HELP!
Thanks a ton!
I wrote the following module for a database. It's supposed to update all records in Table1 for which the Test fields agrees between the two tables (Table1 and Table2) with the Update1, Update2, and Update3 fields from Table2. The reason that I have to create the join is that Table1 is to be imported via a previous step, so I don't have a pre-existing join.
DoCmd.RunSQL "Update Table1 LEFT JOIN Table2 ON Table1.Test = Table2.Test SET Table1.Update1 = Table2.Update1" & _
"Table1.Update2 = Table2.Update2" & _
"Table1.Update3 = Table2.Update3" & _
"Table1.Update4 = Table2.Update4;"
End Function
It works if I don't have to use the line continuation characters, but I'm getting the 3075 run-time error when I do.
HELP!
Thanks a ton!
