I have an Access database and a C# app. The C# app does some things to some tables in Access and I want to refresh the Access form when the C# code ends. I tried to do this:
void refresh()
{
Access.Application acApp = new Access.ApplicationClass();//create msaccess application
object oMissing = System.Reflection.Missing.Value;
//Run the Test macro in the module
acApp.Run("Function_refresh",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,ref oMissing,ref oMissing
,ref oMissing,ref oMissing);
acApp.Quit();//exit application
}
My code works if the DB is closed. How can I use the function if the database is already open?
edit: The C# does some inserts in an Access table, so when it ends I want to refresh the form when it is open.