Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Import Data from Access Database in a Workgroup
H!,
Hope someone can help me, I've been trying to figure this out all day. I have a Database on this Path: C:\AssetTracker\Access 2000 \MMH_CIL_RevN_Cnvrtd.mdb /Wrkgrp \\owgn1mmd\mmh_pm2 \Asset_Tracker\CIL2000Compacted.mdw /Nostartup. I want to import the data from an Access 2000 database table to an Excel 2000 worksheet. The database is password protected and part of a workgroup. I've tried the Wizard, Modifying the .dsn file & attempted to do it by creating a VB function. No dice. Thanx |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Import Data from Access Database in a Workgroup
Use the SystemDB property of the DBEngine Object.
e.g. Sub TestCxn() Dim ws As Workspace Dim db As Database DBEngine.SystemDB = "\\owgn1mmd\mmh_pm2\Asset_Tracker\CIL2000Compacted .mdw" Set ws = CreateWorkspace("", "userID", "password") Set db = ws.OpenDatabase("C:\AssetTracker\Access 2000\MMH_CIL_RevN_Cnvrtd.mdb ", True) Debug.Print db.TableDefs.Count db.Close ws.Close End Sub Replace userID and password with your credentials. If your access is validated, the db's tablecount will be displayed in the immediate window. If not, you'll get an error. From here you can open whatever recordsets you need to get the data into xl (as long as you have the appropriate permissions). Cheers, HWH "David" wrote in message ... H!, Hope someone can help me, I've been trying to figure this out all day. I have a Database on this Path: C:\AssetTracker\Access 2000 \MMH_CIL_RevN_Cnvrtd.mdb /Wrkgrp \\owgn1mmd\mmh_pm2 \Asset_Tracker\CIL2000Compacted.mdw /Nostartup. I want to import the data from an Access 2000 database table to an Excel 2000 worksheet. The database is password protected and part of a workgroup. I've tried the Wizard, Modifying the .dsn file & attempted to do it by creating a VB function. No dice. Thanx |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
database query not showing foxpro database How I import data | New Users to Excel | |||
Database query to import from Access to Excel | Excel Discussion (Misc queries) | |||
How to import multiple sheet of excel into Access database to a diffrent tables?? | Excel Discussion (Misc queries) | |||
MS JET database engine error: workgroup information file is missing or opened exclusively by another user | Excel Discussion (Misc queries) | |||
Excel error while trying to import data from an Access database - MSQRY32.exe has generated errors | Excel Discussion (Misc queries) |