Click here to Skip to main content
15,892,965 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I want to open an procedure in access project and pass the parameters.
I used the below code to open the access project.This creates an new instance.
I want to open the already opened access project.
In the below code XXX.Open_Form is the procedure name and strFormName and strid are the
parameters for the Open_form.

C#
oAccess=new Access.Application();

string strPath=@"E:\Test.adp"; oAccess.OpenAccessProject(strPath,false); 
object oMissing=System.Reflection.Missing.Value;
object strFormName="frmTest";
object strTicketId= "3222";


oAccess.Run("XXX.Open_form", ref strFormName, ref strid , ref oMissing, ref oMissing,  ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing ,ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing ,ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing )
Posted
Updated 28-Oct-11 1:50am
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900