Accessing a MS Access DB using VB?

I am trying to open a MS Access dB on a machine that only has a run-time version of Access using VB.  Currently I am using "CreateObject("Access.Application") to open the .mdb and this works on machines with MS Access but not on ones with just runtime versions.  I have tried GetObject but this fails.  Is there an object similar to Access.Application that is for runtime versions of Access?  Also, the main part of the program is in the .mdb file and runs fine on these machines but I want to open and close it through VB to hide the location of the file from end users.
Who is Participating?
AndySulzConnect With a Mentor Commented:
To Access a database with VB, use the Data1 control and a DBGrid, On the properties for the Data control, make sure you specify a DatabaseName and a RecordSource, on the DBGrid control in the properties make the "Data Source" = to Data1.
Bob LearnedCommented:
The object Access.Application comes on machines where Office has been installed.  The file MSACC8.OLB (Access97) is installed that allows creating Access objects.

This file is not installed with the run-time version of Access, and according to Micro$oft, it is a violation of the license to install this file on a machine that isn't licensed for Office.
If you're simply trying to open a stand-alone run-time only Access project, you probably need the SHELL command.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.