Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Import data from Access Data Base
Hi All, I am using the Office 2000 package.
I have created a template that has numerous Vlookups and referances to data in a control sheet. Currently the data that lives in the Control sheet has to be updated every time a new employee is hired or switches positions. This data is already updated via a Access database employee tbl. Can anyone help me automate the update of the control sheet data? I can't point the main sheet direct to the data base because... a) I don't know how and b) the template is made availible off-line but the Data base is not So I think if I can figure out a way to import the data into my Conrol sheet on demand with the click of a button I would be a local hero. then I'll share my hero biskit with you all :0) |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Import data from Access Data Base
This example copies data from a table named "Employees" in
the database "database.mdb" on the C: drive to Sheet1 beginning at cell "A1" of your Excel spreadsheet. In the Visual Basic Editor, under "Tools/References" be sure to have "Microsoft DAO 3.6 Object Library" selected. Sub ImportTable() Dim DB As Database, RS As Recordset Set DB = OpenDatabase("C:\database.mdb") Set RS = DB.OpenRecordset("Employees") Sheets(1).Range("A1").CopyFromRecordset RS End Sub Just substitute your database path and table name as needed. Hope this helps. Tokash -----Original Message----- Hi All, I am using the Office 2000 package. I have created a template that has numerous Vlookups and referances to data in a control sheet. Currently the data that lives in the Control sheet has to be updated every time a new employee is hired or switches positions. This data is already updated via a Access database employee tbl. Can anyone help me automate the update of the control sheet data? I can't point the main sheet direct to the data base because... a) I don't know how and b) the template is made availible off-line but the Data base is not So I think if I can figure out a way to import the data into my Conrol sheet on demand with the click of a button I would be a local hero. then I'll share my hero biskit with you all :0) . |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Import data from Access Data Base
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel user enter a store # to query Access data base | Excel Discussion (Misc queries) | |||
Import Data from Access | Excel Discussion (Misc queries) | |||
Chart connected to an Access data base | Charts and Charting in Excel | |||
Can't import data to access | Excel Discussion (Misc queries) | |||
Access data base is able to store any number of records | Excel Worksheet Functions |