(Using Access97) I have numerous forms and subforms all with the same cluster of button controls. To save repetition, have created a module where the main routines for each button is taken care of. For example, to call the routine by clicking the delete button on the ManuscriptTitleForm, the delete button event handler does:-
Private Sub BtnDelete_Click()
DeleteBtn ("ManuscriptTitleForm")
End Sub
One bit of the module code does:-
Sub DeleteBtn(FormName As String)
Forms(FormName).BtnOK.SetFocus
Unfortunately, I can't find any syntax that works to send the name of a subform or subsubform to the routine. Any advice much appreciated.
Regards
John
Private Sub BtnDelete_Click()
DeleteBtn ("ManuscriptTitleForm")
End Sub
One bit of the module code does:-
Sub DeleteBtn(FormName As String)
Forms(FormName).BtnOK.SetFocus
Unfortunately, I can't find any syntax that works to send the name of a subform or subsubform to the routine. Any advice much appreciated.
Regards
John