.net – How to prevent to open a MS Access Database while reading data from forms

ms-accessvb.net

To count Activex controls from MS-Access forms using vb.net I am using the connection as follws..

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

and Openning the forms in Design mode, as there is a user input prompt form which prevents us to run the application further if we open it in Default view.

oAccess.DoCmd.OpenForm(FormName:=objForms.Name, View:=AcFormView.acDesign)

Now the problem is:

The DataBase gets opens and along with that all the forms open up while running the application. Is there anyway we just prevent to open the database and forms, while reading the forms.

Thank you.

Best Answer

Sounds like an unsplit application (tables and forms/etc. in a single MDB file), and that it's being shared by multiple users. This is a disastrous scenario. See Splitting your Microsoft Access MDB into a front end and back end for all the details.

Once it's split, you'd work on an individual copy and then distribute updates to users. The point is that since version 2000 the design of an Access MDB (as opposed to the data) cannot be edited while it's open by any users.

Related Topic