VB questions

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Reader
    New Member
    • Jul 2006
    • 2

    VB questions

    1. How to pass parameters between two or more forms?

    2. How to keep the value of varibles between two or more forms?

    3. How to clear the old data in screen and display /input new data in new screen?
  • Hemant Pathak
    Recognized Expert New Member
    • Jul 2006
    • 92

    #2
    Hi Redear
    u can use the Global variable for paas the parameter of one form to anothor form.
    and also use the Public variable

    Comment

    • BSOB
      New Member
      • Jul 2006
      • 77

      #3
      1 and 2 were taken care of by hemant
      3 is not clear what you are asking.
      if you want to clear a screen that has an image on it then use "cls" on a line by itself.
      if you want to empty the data in an object then use
      object.text = ""
      or
      object.value = 0
      depending on the kind of object you are working with.

      Comment

      • Hemant Pathak
        Recognized Expert New Member
        • Jul 2006
        • 92

        #4
        Hi BSOB
        3. You can use for each loop Like
        Dim Ctl as Control
        For each ctl in FormName.Contro ls
        if typeof ctl is textbox then
        ctl.text=""
        elseif typeof ctl is label then
        ctl.Caption=""
        elseif typeof ctl is Combobox the
        ctl.text=""
        'if Combobox Dropdown style is 2 then
        ctl.listindex=-1
        'end so on............. ...
        endif
        Next

        Comment

        Working...