View Single Post
Old 08-01-2015, 05:44 AM
bluenosebex bluenosebex is offline Windows 8 Office 2013
Join Date: Jul 2015
Posts: 3
bluenosebex is on a distinguished road
Question Got it! well nearly... tables pull info through but won't update?

Hi several days later .... I've made a separate mail merge for the sample sheets which I copy and paste into my main report - works a treat...

I've also managed to make some code and pull the info through from the spreadsheet into the word doc tables (hurrah!) BUT... now if I make an update to the information in the excel sheet, the table wont update and I get an error message... This is the code I'm using below... Any help on what I'm dong wrong. Again sorry if this is obvious, but I've never even heard of SQL code before so am on a rather steep learning curve! Thanks

{DATABASE \d "W:\\XXXXX\\XXXXX\\Trial MM data RH.xlsx" \c "Provider=Microsoft.ACE.OLEDB.12.0;User ID=Admin;Data Source=W:\\XXXX\\XXXXX\\Trial MM data RH.xlsx;Mode=Read;Extended Properties=\"HDR=YES;IMEX=1;\";Jet OLEDB:System database=\"\";Jet OLEDB:Registry Path=\"\";Jet OLEDB:Engine Type=37;Jet OLEDBatabase Locking Mode=0;Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Global Bulk Transactions=1;Jet OLEDB:New Database Password=\"\";Jet OLEDB:Create System Database=False;Jet OLEDB:Encrypt Database=False;Jet OLEDBon't Copy Locale on Compact=False;Jet OLEDB:Compact Without Replica Repair=False;Jet OLEDB:SFP=False;Jet OLEDB:Support Complex Data=False;Jet OLEDB:Bypass UserInfo Validation=False;Jet OLEDB:Limited DB Caching=False;Jet OLEDB:Bypass ChoiceField Validation=False" \s\"SELECT `Building`, `Floor`, `Room/Area` FROM `Sheet1$` WHERE ((`Extent of damage score` = '0')) ORDER BY `Sample`" \l "23" \b "191" \h}
Reply With Quote