Recalculate form

J

Jerry

Hello,

I am using this sub to show a form as a control (thanks George) on a main
form. From a treeview the user can select which form should be shown and
worked on.

Private Sub ShowSubForm(ByVal sTabKey As String)

Dim ctl As Control

For Each ctl In Me.Controls
If TypeOf ctl Is Form Then
If ctl.Tag.ToString = sTabKey.ToString Then
ctl.BringToFront()
ctl.Show()
End If
End If
Next
End Sub

If a user later decides he wants to change a value in the first form, the
rest of the following forms need to be recalculated. Right now, I have to
show the form and loose focus on one of the textboxes to do this. I'd like
to have it done as soon as the form is brought to front again. But I can't
find any event that would trigger this.

Can someone help?

Thanks,

Jerry
 
S

Shane Stewart

You might also be able to use the form event "VisibleChanged", which
fires when your form comes up again.

Shane
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top