views:

406

answers:

2

I am connecting to MS Access DB using vb.net as given below...

oDBEngine = oAccess.DBEngine oDB = oDBEngine.OpenDatabase(Name:=strFullFileName, Options:=False, ReadOnly:=False, Connect:="")

And then opening the DB using the following syntex...

oAccess.OpenCurrentDatabase(filepath:=strFullFileName, Exclusive:=False)

Now my problem is:

One of the DB contains a form which opens Automatically while we are opening the DB. So when I am trying to run the application for this particular DB the DB opens up. But as per my requirement I do not need to open the DB explicitly.

Is there any way to restrict the DB to open in such cases?

NOTE: This works fine for all other scenarios i.e. DB is not opening, but I can able to count Activex controls form each form as per my application requirement.

A: 

In your previous post on this topic : http://stackoverflow.com/questions/427436/how-to-prevent-to-open-a-ms-access-database-while-reading-data-from-forms#427460, I suggested importing the forms into a blank database, you did not mention why this option did not suit, and I am curious as to why.

Remou
Thanks for your valuable suggetions. But it is not possible to copy from one location to another and create a new DB because, client may not give pormission to do so also in case of huse DB it may not be fisible to do so. Any other way to do so...
Suman
+1  A: 

You could try 'programmatically pressing the shift-key' through APIs:

http://www.mvps.org/access/api/api0068.htm

Remou