Passing Value to a new Form

  • Thread starter Thread starter Richard Chapman
  • Start date Start date
R

Richard Chapman

This should be a easy question. What i'm trying to do is open a form
from another form and pass a value to the new form. For example, from
the main menu the use selects what form(formB) they want to open. This
acutally opens a pop up form(formA0 where they choose what accountnumber
they want to view. Then i want to open formc passing that accountnumber
to formc.
 
Hello,

Richard Chapman said:
This should be a easy question. What i'm trying to do
is open a form from another form and pass a value to
the new form. For example, from the main menu the
use selects what form(formB) they want to open. This
acutally opens a pop up form(formA0 where they choose
what accountnumber they want to view. Then i want
to open formc passing that accountnumber
to formc.

In the menu item's click event handler:

\\\
Call (New DialogForm(2341239)).ShowDialog(Me)
///

In the dialog:

\\\
Public Class DialogForm
Inherits ...

Private m_Id As Integer

Public Sub New(ByVal Id As Integer)
MyBase.New()
m_Id = Id
...
End Sub
 
Back
Top