Amr Ashraf
Member
- Joined
- Apr 5, 2022
- Messages
- 14
- Programming Experience
- Beginner
Hello Everyone , I use this code to open a password protected access database :
I need two things , First to add the current location to access Trusted Locations .
The other thing is to convert this database to ACCDE , In this point I've tried this :
But I got this compiler error on 603 :
Open DB:
Microsoft.Office.Interop.Access.Application AccApp = new Microsoft.Office.Interop.Access.Application();
string MyFile = Environment.CurrentDirectory + "\\Baseet.accdb";
AccApp.Visible = true;
AccApp.OpenCurrentDatabase(MyFile, false, "017014A");
AccApp.RunCommand(AcCommand.acCmdAppMaximize);
I need two things , First to add the current location to access Trusted Locations .
The other thing is to convert this database to ACCDE , In this point I've tried this :
Convert:
Microsoft.Office.Interop.Access.Application AccApp = new Microsoft.Office.Interop.Access.Application();
string MyFile = Environment.CurrentDirectory + "\\Baseet.accdb";
string MyCompiledFile = Environment.CurrentDirectory + "\\Baseet.accde";
AccApp.Visible = true;
AccApp.OpenCurrentDatabase(MyFile, false, "017014A");
AccApp.RunCommand(AcCommand.acCmdAppMaximize);
AccApp.SysCmd (603 , MyFile , MyCompiledFile);
But I got this compiler error on 603 :
How can I make it work , Any help appreciated .Cannot convert from int to Microsoft.Office.Interop.Access.AcSysCmdAction