When I have a FormB that I go to from other FormA, I just have simple:
Code:
[green]'Code in FormA[/green]
FormB.Show
Unload Me
[green]'Code in FormB[/green]
FormA.Show
Unload Me
But what about if I have a FormX that I need to access from several Forms and then in FormX I need to go back to the Form I came from?
Right now in every Form that accesses FormX I have something like:
Code:
Option Explicit
Public frmGoBackTo As Form
Private Sub cmdReturn_Click()
Me.MousePointer = vbHourglass
frmGoBackTo.Show
frmGoBackTo.Refresh
Me.MousePointer = vbDefault
Unload Me
Exit Sub
Code:
With FormX
Set .frmGoBackTo = Me
Show
End With
Unload Me
This way works just fine, I just want to know if there is a better way to do it. I am sure there is....
Have fun.
---- Andy