Click a button on an MS Access form from C# using Access Interop
- by Az
Hi, I can connect to the access database and run functions etc from c#, I can even get a hold of the button I need to click, but I can't make it think it's been clicked.
nonManagedDb.DoCmd.OpenForm("frmMaintenance", Access.AcFormView.acNormal, MissingVal, Access.AcFormOpenDataMode.acFormReadOnly, Access.AcWindowMode.acWindowNormal, MissingVal);
var RunRep = (CommandButton)nonManagedDb.Forms["frmMaintenance"].Controls["btnDailySheetsReport"];
That's as afar as I've gotten with this, I've tried reflection to grab it's event and invoke it but it's classed as a COM object only so that's out.