I have 10 buttons on a form. Each button needs to call a subroutine. Each subroutine is basically the same.
Do I have to write 10 separate OnClick event procedures, or can I call the same procedure from each button's OnClick event? For example:
If btn1 is clicked, On Click -> Call sbPreviewReport(1)
If btn2 is clicked, On Click -> Call sbPreviewReport(2)
If btn3 is clicked, On Click -> Call sbPreviewReport(3)
etc...
If I can write one function, can it be in the form's code module, or do I need to place it in it's own module?
Do I have to write 10 separate OnClick event procedures, or can I call the same procedure from each button's OnClick event? For example:
If btn1 is clicked, On Click -> Call sbPreviewReport(1)
If btn2 is clicked, On Click -> Call sbPreviewReport(2)
If btn3 is clicked, On Click -> Call sbPreviewReport(3)
etc...
If I can write one function, can it be in the form's code module, or do I need to place it in it's own module?