Opening an access application

ram_Sathish

New Member
Joined
Jun 12, 2006
Messages
15
Hi All,

I tried opening an access application through creating an object of the access application in VB 6.0 by giving the following codes.

set obj =createobject ("access.application")
set obj1=obj.openaccessproject("Path of the file")

i am unable to open an access application.
please help me out.


thanks
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"

SydneyGeek

MrExcel MVP
Joined
Aug 5, 2003
Messages
12,251
Ram, If you are using ADO to connect you will need to reference the ADO 2.x library and use this syntax:
Code:
Dim adoconnection As ADODB.Connection
Dim rs As ADODB.Recordset
Dim connectstring As String

Set adoconnection = New ADODB.Connection
Set rs = New ADODB.Recordset

connectstring = "provider=microsoft.jet.oledb.3.51;" _
& "data source=YourDB_Path"

adoconnection.Open connectstring
If you are using DAO you will need to reference the DAO 3.6 library and use syntax like this:
Code:
Dim db as dao.database 
set db = dbengine.workspaces(0).opendatabase("YourDB_path")
Denis
 

Forum statistics

Threads
1,141,756
Messages
5,708,329
Members
421,565
Latest member
Lastadiego

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top