C
ChasW
Given the simplified code example below, what type of procedure or
function do I need to make so that both of these procedures can call
it and so when the called procedure is completed, flow returns to the
caller?
In other BASICs that I have used, this would be a GOSUB and a RETURN,
but I am not sure about VBA.
Private Sub Search_FORM_Click()
'call the common subroutine
'upon completion of the subroutine, program flow returns here
' Open subform query
DoCmd.OpenForm "someDocName", acNormal, acReadOnly
End Sub
Private Sub Search_DATASHEET_Click()
'call the common subroutine
'upon completion of the subroutine, program flow returns here
' Open subform query
DoCmd.OpenForm "someDocName", acFormDS, acReadOnly
End Sub
Thanks in advance,
Chas
function do I need to make so that both of these procedures can call
it and so when the called procedure is completed, flow returns to the
caller?
In other BASICs that I have used, this would be a GOSUB and a RETURN,
but I am not sure about VBA.
Private Sub Search_FORM_Click()
'call the common subroutine
'upon completion of the subroutine, program flow returns here
' Open subform query
DoCmd.OpenForm "someDocName", acNormal, acReadOnly
End Sub
Private Sub Search_DATASHEET_Click()
'call the common subroutine
'upon completion of the subroutine, program flow returns here
' Open subform query
DoCmd.OpenForm "someDocName", acFormDS, acReadOnly
End Sub
Thanks in advance,
Chas