I'm trying to duplicate an MsAccess app in C#. In the Access App I have dozens of forms which have some contols which are common to them all. For Instance, they all have a NewRecordButton. I want to call a global InsertNewRecord() function when the NewRecordButton is clicked. In MsAccess I pass the name of the form as an argument, but in C# I think I can pass a reference to the form. So in the form I have the code:
private void NewRecordButtonClick(object sender, EventArgs e)
And in my class which houses my global routines I have this:
public class MyFormClass
Public void InsertRecord(Form TheForm)
This doesn't work. So what am I doing wrong?