I wrote a piece of code using Microsoft.Office.Interop.Access to get an Access Form, but I did not find any information to display this Form in a certain window.
Application MSAccess = new Application();
try
{
MSAccess.OpenCurrentDatabase(@"c:\Test\Test.accdb");
string formName = "Form1";
MSAccess.DoCmd.OpenForm(formName, AcFormView.acDesign);
Form frm = MSAccess.Forms[formName];
foreach (Control ctl in frm.Controls)
{
Console.WriteLine();
Console.WriteLine(String.Format(" [{0}]", ctl.Name));
Console.WriteLine(String.Format(" {0}",ctl.GetType()));
}
}
catch (Exception ex)
{
Console.WriteLine(ex.StackTrace);
}
finally
{
MSAccess.CloseCurrentDatabase();
MSAccess.Quit();
}
My suggestion is to get the data like stonez-0855, and then build a window to display it.
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.