0

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.

2
  • You're connecting to a Jet database, not an Access database, as only Access itself can utilize Access objects. You're using only the data tables, which means Jet only. Commented Jan 12, 2009 at 21:54
  • Ooops. Didn't read carefully. Why are you opening the database? Do you need to run the forms, or are you just trying to access the data? If the latter, then don't open the database, but use OLEDB or some other database interface to access the data. Commented Jan 12, 2009 at 21:55

2 Answers 2

1

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

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

Sign up to request clarification or add additional context in comments.

Comments

0

In your previous post on this topic : How to prevent to open a MS Access Database while reading data from forms, 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.

1 Comment

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...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.