Microsoft Office Forums MySQL data source

Go Back   Microsoft Office Forums > >

Thread Tools Display Modes
Old 08-07-2017, 12:58 AM
travb81 travb81 is offline MySQL data source Windows 10 MySQL data source Office 2016
MySQL data source
Join Date: Aug 2017
Posts: 6
travb81 is on a distinguished road
Default MySQL data source

We have our data source as an Access 2016 database.

I have some VBA code to connect the mailmerge data, works great!
SQL statement looks like this:
"SELECT * FROM [qryJobsCollate] WHERE ([JobNumber]=" & strJobNumber & " AND qryJobsCollate.CStatusID<>5 AND qryJobsCollate.CStatusID<>7);"
Our backend database is now moving to a MySQL database, and I'm having all sorts of trouble maintaining MailMerge functionality.

I have an ODBC driver installed, and that works well for Excel to connect to MySQL and do what it needs to do.
But Word is not playing the game.

Some of the difficulties...
MySQL only has tables, no queries. So if Word is to include the query statement, it's going to include joins be >250 characters...

SELECT tblJobs.JobNumber, tblJobs.JobName, tblClients.CompanyName, tblPeople.FirstName, tblPeople.FullName, tblClients.Address1, tblClients.Address2C, tblPeople.Email, tblJobClientLink.CStatusID
FROM tblPeople INNER JOIN (tblJobs INNER JOIN (tblClients INNER JOIN tblJobClientLink ON tblClients.ID = tblJobClientLink.ClientID) ON tblJobs.JobID = tblJobClientLink.JobID) ON tblPeople.ID = tblJobClientLink.ContactID
WHERE (((tblJobClientLink.CStatusID)<>5 And (tblJobClientLink.CStatusID)<>7));
Has anyone has success with MySQL, obtaining data from joined tables?
I'm leaning towards writing some intermittent code that grabs the data out of MySQL, and puts it into another format (eg Excel spreadsheet) for Word to MailMerge from.
Reply With Quote

Thread Tools
Display Modes

Similar Threads
Thread Thread Starter Forum Replies Last Post
Word & Excel 2010 - Best Options To Auto Insert MySQL & Excel Data? Hoser Word 1 03-17-2017 03:47 PM
Share my data on via MYSQL??? cwksr Excel 0 08-24-2014 03:23 AM
How to populate cells in Sheet2 with Data Source query using cell data from Sheet1 bobznkazoo Excel 2 03-27-2014 11:14 AM
MySQL data source Mail Merge / DSN / Data Link / MySQL Bob Young Mail Merge 5 05-18-2012 03:44 PM
Edit Data Source- Linking template charts to new data lbf PowerPoint 0 10-28-2011 12:19 PM

All times are GMT -7. The time now is 10:04 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2019 DragonByte Technologies Ltd. is not affiliated with Microsoft