opening and viewing an access-database

P

Peer

While I'm working in a worksheet I want to open and view an acces
database file.
So far I've been able to open access by using this code:

Dim accApp
accApp = Shell("C:\Program Files\Microsoft Office\Office\msaccess.exe"
vbMaximizedFocus)

But I want access to immediately open a database and this I have bee
unable to do.

I tried everything I could find on the internet, like

GetObject
Getfile
Run
Activate
Execute
etc.

Yet nothing I've tried does what I want.

Anybody help me, plz?!

Pee
 
T

Tod

Are you attempting to retrieve data from that database for
use in your workbook? You can use something like ADO to do
that.
 
F

Frank Stone

If i understand you, you just want to open the xl file and
view the data.
link to it. first give the range in excel a name
Then in access click the table tab then
file>get external date>link tables
this will call up the link dialog box
in the bottom left combo box select microsoft excel
in the top left combo box select the directory the file is
in then double click the file.
This will call up the link spredsheet wizard.
select the show name range option then select the range
name you gave the range earlier.(otherwize the wizard will
select the entire excel sheet.)
click next. select first row has names
click next. give the link a access name. click finish.
The link will appear in the table part of access, you can
open it and view it all you want. you can even use it to
write querys because access now treats it like a table.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top