Passing data

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bronen
    New Member
    • Feb 2007
    • 6

    Passing data

    I am using Access 2003. I have a simple OnClick() command button that does the following

    Forms![Form2]![ProjectNumber] = Me![cboProjectNumbe r]

    Why do I have to have Form2 open for this to work? is there something I can code in that will allow me to click the command button and the data from cboProjectNumbe r automatically copies to the ProjectNumber field in another table/form?
  • vijaydiwakar
    Contributor
    • Feb 2007
    • 579

    #2
    Originally posted by bronen
    I am using Access 2003. I have a simple OnClick() command button that does the following

    Forms![Form2]![ProjectNumber] = Me![cboProjectNumbe r]

    Why do I have to have Form2 open for this to work? is there something I can code in that will allow me to click the command button and the data from cboProjectNumbe r automatically copies to the ProjectNumber field in another table/form?
    explain it in detail with thy front endand backend

    Comment

    • bronen
      New Member
      • Feb 2007
      • 6

      #3
      I have a form1 and form2.

      Form1 contains two unbound textboxes "ProjectNum ber" and "ProjectNam e"
      Form2 contains two textboxes "ProjectNo" and "ProjName" that are tied to a table.

      I have a button on Form1 that after the data is typed in and you click the button. What I want is the data that was typed in Form1 gets "sent" to the corresponding fields in Form2. How can I do that efficiently WITHOUT opening Form2? Or can it be sent from Form1 to a table? I need specific code..i'm a newbie.

      Comment

      • vijaydiwakar
        Contributor
        • Feb 2007
        • 579

        #4
        Originally posted by bronen
        I have a form1 and form2.

        Form1 contains two unbound textboxes "ProjectNum ber" and "ProjectNam e"
        Form2 contains two textboxes "ProjectNo" and "ProjName" that are tied to a table.

        I have a button on Form1 that after the data is typed in and you click the button. What I want is the data that was typed in Form1 gets "sent" to the corresponding fields in Form2. How can I do that efficiently WITHOUT opening Form2? Or can it be sent from Form1 to a table? I need specific code..i'm a newbie.
        see u can achive this task by storing data from form1 to any array and then at the load of second form collect all data from that array.
        or u can create a file from form1 and open it in the load of second
        see u can directly give values to other form also don'e use show method for socond form the form will be get loaded in the memory then hide it

        Comment

        • Killer42
          Recognized Expert Expert
          • Oct 2006
          • 8429

          #5
          Originally posted by bronen
          I have a form1 and form2.

          Form1 contains two unbound textboxes "ProjectNum ber" and "ProjectNam e"
          Form2 contains two textboxes "ProjectNo" and "ProjName" that are tied to a table.

          I have a button on Form1 that after the data is typed in and you click the button. What I want is the data that was typed in Form1 gets "sent" to the corresponding fields in Form2. How can I do that efficiently WITHOUT opening Form2?
          I don't understand - what do you expect to happen, if form2 is not open? If the form isn't open, the controls on it effectively don't exist, so how can you put anything in them?

          Comment

          Working...