transfer values from form a to form RRS feed

  • Question

  • i have a customer db and my form A shows a customer that i choose.

    i try to create a button that on click will open new form (FORM B) with values of that particular customer.

    and when i close form B and change the customer on FORM A, clicking the button will open again FORM B but with the new values.

    for now i succeed on transfer value with "PUBLIC" value but it works for me with constant values, i cant' change it every time i switch customer..

    Thursday, September 13, 2018 2:43 PM

All replies

  • Hi

    In FormA, define a variable lets say, Dim frmB as New FormB

    then set some items on FormB from your info on FormA

    say, frmB.TextBox1.Text=TextBox33.Text this sets the TextBox1 on FormB (called frmB) with the same value as TextBox33 on FormA

    Repeat for all the data you want from FormA to FormB

    Then, finally, frmB.Show to show the Form with the values set.

    Regards Les, Livingston, Scotland

    Thursday, September 13, 2018 3:07 PM
  • You should always post code so it leaves nothing to the imagination.

    Live as if you were going to die today, learn as if you were going to live forever -Mahatma Gandhi

    Thursday, September 13, 2018 3:08 PM