Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Retrieve from Acces

Hi,

Is there a way to retrieve infomration from a MS Access database and load a
spreadsheet?

--
WayneR
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Retrieve from Acces

Hi WayneR

Try the examples on this page
http://www.rondebruin.nl/accessexcel.htm

--
Regards Ron De Bruin
http://www.rondebruin.nl



"WayneR" wrote in message ...
Hi,

Is there a way to retrieve infomration from a MS Access database and load a
spreadsheet?

--
WayneR



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Retrieve from Acces

Great examples Ron,

Do you possibly have anything similar for updating Access DB from Excel? --

--
WayneR


"Ron de Bruin" wrote:

Hi WayneR

Try the examples on this page
http://www.rondebruin.nl/accessexcel.htm

--
Regards Ron De Bruin
http://www.rondebruin.nl



"WayneR" wrote in message ...
Hi,

Is there a way to retrieve infomration from a MS Access database and load a
spreadsheet?

--
WayneR




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Retrieve from Acces

Working on it Wayne
Not much time for it on this moment

You can also check out this site for example code
http://www.erlandsendata.no/english/...php?t=envbadac


--
Regards Ron de Bruin
http://www.rondebruin.nl



"WayneR" wrote in message ...
Great examples Ron,

Do you possibly have anything similar for updating Access DB from Excel? --

--
WayneR


"Ron de Bruin" wrote:

Hi WayneR

Try the examples on this page
http://www.rondebruin.nl/accessexcel.htm

--
Regards Ron De Bruin
http://www.rondebruin.nl



"WayneR" wrote in message ...
Hi,

Is there a way to retrieve infomration from a MS Access database and load a
spreadsheet?

--
WayneR






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Retrieve from Acces

Yes it is that I use is: Let me know how it works. Make sure u modify it to
accept you sheet names and path names

Dim DbFullName As String
Dim Cnct As String, Src As String
Dim Connection As ADODB.Connection
Dim Recordset As ADODB.Recordset
Dim Col As Integer

Cells.Clear

'Connects to the MS Access Database
Set Connection = New ADODB.Connection
Cnct = "Driver={Microsoft Access Driver
(*.mdb)};Dbq=C:\Pathname;Uid=Admin;Pwd=;"
Connection.Open ConnectionString:=Cnct

'Opens the recordset
Set Recordset = New ADODB.Recordset

With Recordset

'Copies the field names from the database into an Excel worksheet
For Col = 0 To Recordset.Fields.count - 1
Sheets("List").Range("A1").Offset(0, Col).Value =
Recordset.Fields(Col).Name
Next

'Copies the data inside the recordset into a worksheet
Sheets("List").Range("A1").Offset(1, 0).CopyFromRecordset
Recordset

End With
Set Recordset = Nothing
Connection.Close
Set Connection = Nothing
End Sub
"WayneR" wrote:

Hi,

Is there a way to retrieve infomration from a MS Access database and load a
spreadsheet?

--
WayneR



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Loop to acces various rows Mhek Excel Programming 1 April 12th 06 10:00 PM
export to excel from acces and format BillyRogers Excel Programming 1 February 27th 06 06:45 PM
Sheets - Limited acces Darin Kramer Excel Programming 0 March 22nd 05 02:48 PM
Sheets - Limited acces Darin Kramer Excel Programming 2 March 21st 05 05:48 PM
Working betwen excel and acces filo666 Excel Discussion (Misc queries) 5 February 16th 05 07:19 PM


All times are GMT +1. The time now is 02:39 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"