943,812 Members | Top Members by Rank

Ad:
Aug 14th, 2007
0

Trying to copy data from one form to another form

Expand Post »
Alright, I have an MCSE and A+ education, but nothing is as confusing as script for VB. Well, I take that back it can be pretty simple but sometimes I just can't see the forrest for the trees. I'm trying to copy the data from a text box named creditbox in form1 and copy into the text box named creditbox in form2 how can I do that? I dont know where to start, but I want it to be copied over as soon as form2 is opened. Both forms will be kept opened so I need a button that can retrieve the data later as well. Please Help!
Last edited by venomocity; Aug 14th, 2007 at 2:58 pm. Reason: Left out some info
Similar Threads
Reputation Points: 2
Solved Threads: 0
Newbie Poster
venomocity is offline Offline
16 posts
since Aug 2007
Aug 14th, 2007
0

Re: Trying to copy data from one form to another form

form2.creditbox = form1.creditbox
Reputation Points: 10
Solved Threads: 16
Posting Whiz in Training
plusplus is offline Offline
207 posts
since Jul 2007
Aug 14th, 2007
0

Re: Trying to copy data from one form to another form

This is no problem but take note the for every control that you have there must be a parent reference that is for the first form form1 when you type form1.text1.text that will give you all the content of the textbox then when you want the content in the next textbox then you equate it to the next textbox that is form2.text2.text= form1.text1.text this will give the textbox it content NB this method is allicable to other control in VB and with that your can do and Undo OK
Reputation Points: 10
Solved Threads: 3
Junior Poster in Training
atplerry is offline Offline
58 posts
since Jul 2007
Aug 14th, 2007
0

Re: Trying to copy data from one form to another form

Click to Expand / Collapse  Quote originally posted by plusplus ...
form2.creditbox = form1.creditbox
Put this in your form_load event of form2
put a commandbutton on the form and put this code in the command_click event
Reputation Points: 10
Solved Threads: 16
Posting Whiz in Training
plusplus is offline Offline
207 posts
since Jul 2007

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Visual Basic 4 / 5 / 6 Forum Timeline: upper and lower case
Next Thread in Visual Basic 4 / 5 / 6 Forum Timeline: I want to have a page that will download things on my site





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC