Hi Fellows..
Heres wht I am trying to do..
I have two buttons in my form.
1. Add to database and print
2. Just Print
I have the codes written for both, Heres wht I want to do, whn you click Button 1, it shd execute the SubRoutine 2 and then its own statements as the second subroutine is just a sub-set of the first one I dont want to repeat code.
This is how the code looks
Sub btnSubmit_Click(sender As Object, e as System.EventArgs)
Call btnPrint_Click
.....
....
....
end sub
Public Sub btnPrint_Click(sender As Object, e As System.EventArgs)
.....
.....
.....
end sub
I need to know how to call the second sub from the first (Correct syntax implementation) given that both are button click events and are linked to respective buttons by onClick event.
Your help will be greatly appriciated..
thanks
Sid
Heres wht I am trying to do..
I have two buttons in my form.
1. Add to database and print
2. Just Print
I have the codes written for both, Heres wht I want to do, whn you click Button 1, it shd execute the SubRoutine 2 and then its own statements as the second subroutine is just a sub-set of the first one I dont want to repeat code.
This is how the code looks
Sub btnSubmit_Click(sender As Object, e as System.EventArgs)
Call btnPrint_Click
.....
....
....
end sub
Public Sub btnPrint_Click(sender As Object, e As System.EventArgs)
.....
.....
.....
end sub
I need to know how to call the second sub from the first (Correct syntax implementation) given that both are button click events and are linked to respective buttons by onClick event.
Your help will be greatly appriciated..
thanks
Sid