Link to home
Start Free TrialLog in
Avatar of bdb12
bdb12

asked on

Switching between forms

Hi, learning VB 2005

Question:
In my app, I have 2 forms.

On form A, I want to click a button that directs the user to form B.


But I want to populate Form B with values entered into Form A.

How can I do that?


I tried something like this in the code for Form A


private buttonClick()

FormB.TextBox1 = FormA.TextBox1


But it doesn't recognize FormB

Thanks
ASKER CERTIFIED SOLUTION
Avatar of MrRobot
MrRobot
Flag of Türkiye image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ah vb2005

put a public function into formB, like

public sub ShowData(myData)

and display your data in that function. call the function from formA, feeding it with the data you want to be displayed.
actually,

public sub ShowData(myData as string)
SOLUTION
Avatar of Mike Tomlinson
Mike Tomlinson
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of bdb12
bdb12

ASKER

hmmmmmm....

in VB.NET you can just do response.redirect....is there a similar way in VB 2005?
Avatar of bdb12

ASKER

form names are pk and app framework enabled
Avatar of bdb12

ASKER

working now thx