mnaeem2k, you are new to the forums. This is the type of post that should have its own thread, and they are easy to create. For future reference, please consider that if you have a new problem, it (and you) deserve the response that comes from having a separate thread for it.
OK, that error tells me that whatever you have for the OnClick event, something is wrong with it. Depending on the type of control, you have some choices for an OnClick property. You can name an existing macro; you can write a procedure to be executed; or you can use the [Event Procedure] choice so that the form calls your event procedure when the event occurs.
If you use a specific common event procedure that you wrote, the procedure has to be "visible" to the code that will call it, which means it is either in the form's Class Module or it is a Public Sub in a general module. In this case, assure that you spelled the name correctly in the OnClick event slot and assure that it is visible.
If you have a named macro that does what you want, you can name the macro and it will be executed. Again, assure that you spelled the name correctly in the event slot.
If you use the "standard" [Event Procedure] option, there will be a Private Sub entry point in your class module with the name of the control and OnClick, as for example, MyButton_OnClick. You put your code in that routine and assure that you don't have an error in the code that causes a machine or system fault.
Since you are seeing an error based on differences between the O/S (7 vs. 10), the question is: What do you call from the particular control's OnClick event? It is possible that the correct way to run this is to make the ACCDE file on the Win7 system and then run it on the Win10 system, because Windows apps don't downgrade very well.