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

I THINK YOU NEED TO USE

form2.text1.text=text1.text
not the other way

Your way of updating record is not good...

clear the datafield and data source text1 control of form2. and try. I hope it will work.

Haven't you tried debasi's suggestion?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.