H
I want to open an .mdb file for viewing purposes to the User
The User should not be able to change anything contained in that database
He should be able to only view the contents
How can I achieve this
For Word,Powerpoint and Excel, in the Open method itself we can specify whether the file is to be opened as Readonly
But I do not find any such specification for access .md
I do not want to change the attributes of file and make it Readonly
The code that I am using right now i
Dim objAccessAppl As Microsoft.Office.Interop.Access.Applicatio
objAccessAppl = New Microsoft.Office.Interop.Access.Applicatio
objAccessAppl.Visible = Tru
objAccessAppl.OpenCurrentDatabase("Filename.mdb", False
Can anyone please guide how to do this
I am using Access 10.0 object library in VB.NET
TIA
Paul Clement - 27 Apr 2004 15:00 GMT
¤ Hi
¤
¤ I want to open an .mdb file for viewing purposes to the User.
¤ The User should not be able to change anything contained in that database.
¤ He should be able to only view the contents.
¤ How can I achieve this?
¤ For Word,Powerpoint and Excel, in the Open method itself we can specify whether the file is to be opened as Readonly.
¤ But I do not find any such specification for access .mdb
¤ I do not want to change the attributes of file and make it Readonly.
¤ The code that I am using right now is
¤
¤ Dim objAccessAppl As Microsoft.Office.Interop.Access.Application
¤ objAccessAppl = New Microsoft.Office.Interop.Access.Application
¤ objAccessAppl.Visible = True
¤ objAccessAppl.OpenCurrentDatabase("Filename.mdb", False)
¤
¤ Can anyone please guide how to do this?
¤ I am using Access 10.0 object library in VB.NET.
Try using objAccessAppl.DBEngine.OpenDatabase with the ReadOnly argument set to True first and then
call OpenCurrentDatabase.
Paul ~~~ pclement@ameritech.net
Microsoft MVP (Visual Basic)