jakemail
asked on
Cancel Button
I can currently access form "A" through form "B" or form "C". I have a cancel button on form "A" which when clicked I would like it to return me to the form that I was using previously. How can I code this cancel button to take me to the form I was previously on before going to form "A". Any help would be appreciated.
P.S. I am using form show - form hide to do this.
P.S. I am using form show - form hide to do this.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Instead of using a load event, create a Public Sub as follows
declare a form level variable
dim fLastForm as form
Public Sub Start(frmCall as form)
set flastform=frmcall
flastform.hide
**whatever code you need to start on your form**
me.show
End sub
in the unload event of the form
add the line
flastform.show