SQL in VBA - how to update a table with info from another
SQL in VBA - how to update a table with info from another
(OP)
I can't get this line of code to work.
table net_download has
fields onloan and settleloc
Table sdave has
fields loc
DoCmd.RunSQL "update net_download set onloan = table![sdave]![loc] WHERE settleloc = tables![sdave]![loc];"
When I run this it asks me for the parameter value for tables![sdave]![loc]. I have tried different configurations but I can't seem to update the onloan field net_download when the settloc field is equal to the loc field in sdave.
Can you help?
Thanks a lot!
table net_download has
fields onloan and settleloc
Table sdave has
fields loc
DoCmd.RunSQL "update net_download set onloan = table![sdave]![loc] WHERE settleloc = tables![sdave]![loc];"
When I run this it asks me for the parameter value for tables![sdave]![loc]. I have tried different configurations but I can't seem to update the onloan field net_download when the settloc field is equal to the loc field in sdave.
Can you help?
Thanks a lot!
RE: SQL in VBA - how to update a table with info from another
http://www.tek-tips.com/gthreadminder.cfm/lev2/4/lev3/27/pid/181
http://www.tek-tips.com/gthreadminder.cfm/lev2/4/lev3/32/pid/222
There is probably a problem with the way your SQL string is constructed.