![]() |
Excel running Access query
I have an Excel application that gets data from an Access database.
What I wish to do is run some code from Excel to automate the updating of the Access database. Within thew Access database I have an append query set up. How can I run this query from Excel? Many thanks in advance. |
Excel running Access query
Using ADO:
Dim cn As ADODB.Connection Set cn = New ADODB.Connection With cn .Provider = "Microsoft.Jet.OLEDB.4.0;" .ConnectionString = "Data Source=DBFileName" .Open With .Command .CommandText = "qryName" .CommandType = adCmdUnknown .Execute End With .Close End With Nigel RS wrote: I have an Excel application that gets data from an Access database. What I wish to do is run some code from Excel to automate the updating of the Access database. Within thew Access database I have an append query set up. How can I run this query from Excel? Many thanks in advance. -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...mming/200708/1 |
Excel running Access query
Many thanks
"Trevor via OfficeKB.com" wrote: Using ADO: Dim cn As ADODB.Connection Set cn = New ADODB.Connection With cn .Provider = "Microsoft.Jet.OLEDB.4.0;" .ConnectionString = "Data Source=DBFileName" .Open With .Command .CommandText = "qryName" .CommandType = adCmdUnknown .Execute End With .Close End With Nigel RS wrote: I have an Excel application that gets data from an Access database. What I wish to do is run some code from Excel to automate the updating of the Access database. Within thew Access database I have an append query set up. How can I run this query from Excel? Many thanks in advance. -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...mming/200708/1 |
All times are GMT +1. The time now is 01:39 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com