![]() |
Chartspace Data Source and Connection String Problem
I've embedded the activex chart control on a form. It needs to pull data from
an access database. When hardcoded into properties, the chart works fine, but I'd like to dynamically be able to pull the data from whatever directory the file may reside in. Here's the code that isn't working, thoughts appreciated 'Create variable for connection string less path Dim strConnection As String 'The access db has the same name as the workbook strConnection = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Left(ActiveWorkbook.FullName, Len(ActiveWorkbook.FullName) - 4) & ".mdb;Persist Security Info=False;Jet OLEDB:Database Password=;" frmMain.ChartSpace1.ConnectionString = strConnection frmMain.ChartSpace1.DataMember = "qryDJIA" frmMain.ChartSpace1.Refresh |
All times are GMT +1. The time now is 09:39 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com