943,862 Members | Top Members by Rank

Ad:
Oct 8th, 2008
0

passing data from form1 to form2

Expand Post »
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
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
regalla_c is offline Offline
16 posts
since Feb 2008
Oct 8th, 2008
0

Re: passing data from form1 to form2

I THINK YOU NEED TO USE

form2.text1.text=text1.text
not the other way
Featured Poster
Reputation Points: 665
Solved Threads: 427
Posting Genius
debasisdas is offline Offline
6,406 posts
since Feb 2007
Oct 10th, 2008
0

Re: passing data from form1 to form2

Your way of updating record is not good...
Reputation Points: 11
Solved Threads: 49
Posting Whiz
jireh is offline Offline
316 posts
since Jul 2007
Oct 18th, 2008
0

Re: passing data from form1 to form2

clear the datafield and data source text1 control of form2. and try. I hope it will work.
Reputation Points: 10
Solved Threads: 1
Junior Poster in Training
pardeep3dec is offline Offline
87 posts
since Jul 2008
Oct 20th, 2008
0

Re: passing data from form1 to form2

Haven't you tried debasi's suggestion?
Last edited by jireh; Oct 20th, 2008 at 8:38 am.
Reputation Points: 11
Solved Threads: 49
Posting Whiz
jireh is offline Offline
316 posts
since Jul 2007

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: Need Help Calculating Days Active based on dates
Next Thread in Visual Basic 4 / 5 / 6 Forum Timeline: opening a database from vb6





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


Follow us on Twitter


© 2011 DaniWeb® LLC