davidbodhi
Davidbodhi
- Local time
- Today, 04:51
- Joined
- Jul 6, 2005
- Messages
- 79
I have a simple database application where the programmer has the same code in two locations to do the same thing, depending which event happens.
I'd like to turn that code into a function and call it instead, so it's only present one time.
The two instances start:
Private Sub cboPatient_Name_Exit(Cancel As Integer)
>code follows<
End Sub
and
Private Sub Form_Current()
>code follows<
End Sub
Everything is working, I just want to tidy this up. I can copy the code and make it into a function:
Function Balance_Due()
>code follows<
End Function
but how to do I replace the above Private Subs with calls to Balance_Due()?
Thanks for any help!
I'd like to turn that code into a function and call it instead, so it's only present one time.
The two instances start:
Private Sub cboPatient_Name_Exit(Cancel As Integer)
>code follows<
End Sub
and
Private Sub Form_Current()
>code follows<
End Sub
Everything is working, I just want to tidy this up. I can copy the code and make it into a function:
Function Balance_Due()
>code follows<
End Function
but how to do I replace the above Private Subs with calls to Balance_Due()?
Thanks for any help!