passing data from form1 to form2

Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Feb 2008
Posts: 15
Reputation: regalla_c is an unknown quantity at this point 
Solved Threads: 0
regalla_c regalla_c is offline Offline
Newbie Poster

passing data from form1 to form2

 
0
  #1
Oct 8th, 2008
Dear friends,
i want to pass data from one form to another form which is having back end ms access table1 for form1, table2 for form2 connected to forms with databound controls data1.
my problem is while entering data in text1 of forms1, it should go to text1 of form2 auto matically and should be updated. iam using following code for linking and updating data
in lost focus event of text1 in form1
form2.data1.recordset.addnew
text1.text=form2.text1.text
form2.data1.recordset.update
form2.data1.refresh
end sub.
data is being transferred to form2, text1 and also ms access table.but somany rows are being created without any data in form2 database.

i request any body to correct this error and give me guidance
thanking you
Reply With Quote Quick reply to this message  
Join Date: Feb 2007
Posts: 2,139
Reputation: debasisdas will become famous soon enough debasisdas will become famous soon enough 
Solved Threads: 132
debasisdas's Avatar
debasisdas debasisdas is offline Offline
Postaholic

Re: passing data from form1 to form2

 
0
  #2
Oct 8th, 2008
I THINK YOU NEED TO USE

form2.text1.text=text1.text
not the other way
Share your Knowledge.
Reply With Quote Quick reply to this message  
Join Date: Jul 2007
Posts: 300
Reputation: jireh is an unknown quantity at this point 
Solved Threads: 43
jireh's Avatar
jireh jireh is offline Offline
Posting Whiz

Re: passing data from form1 to form2

 
0
  #3
Oct 10th, 2008
Your way of updating record is not good...
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 55
Reputation: pardeep3dec is an unknown quantity at this point 
Solved Threads: 1
pardeep3dec pardeep3dec is offline Offline
Junior Poster in Training

Re: passing data from form1 to form2

 
0
  #4
Oct 18th, 2008
clear the datafield and data source text1 control of form2. and try. I hope it will work.
Reply With Quote Quick reply to this message  
Join Date: Jul 2007
Posts: 300
Reputation: jireh is an unknown quantity at this point 
Solved Threads: 43
jireh's Avatar
jireh jireh is offline Offline
Posting Whiz

Re: passing data from form1 to form2

 
0
  #5
Oct 20th, 2008
Haven't you tried debasi's suggestion?
Last edited by jireh; Oct 20th, 2008 at 8:38 am.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:




Views: 1733 | Replies: 4
Thread Tools Search this Thread



Tag cloud for Visual Basic 4 / 5 / 6
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC