i have two forms and on each form one text box having access database behind and is connected to forms by using data bound controls. My problm is that what ever value i enter form1.text1 , it should come in form2.text1. iam using code like this
in form1 lost focus event text1.text= form2.text1.text . it is ok . but how to update database simultaneously form1 and form2 sa time. please any body give answer in detail

Recommended Answers

All 8 Replies

just clear this out first.

will the values from both textboxes update the same field or u need to update two separate fields with these two values simultaneously?

if i wrong judged this then plz make me correct

My intension is whatever the value i enter form1.text1 ,it should be automatically entered in form2.text1 and table1,table2 which are connected with databound control with access database should be updated in database. will you please give me codent code in form1, form2 to do the above mentioned.

is these two forms are both open? geh hard to picture out... why do you need your form acts that way? can you please state what you are really up to?

Iam explaning this prooblem indetail. first i prepared data base in ms access named Name.mdb and made 2 tables table1,table2 which is having one text box in each. next in front end form1 i put one text box, form2 also i put one text box and connected with table1, table2 with data bound control. i put code in form2 text gotfocus event that text1.text= form1.text1.text. iam getting the current value whatever is being entered in form1.but iam not understanding how to update database in table2 while entering the values in form1.text1 only. iwant to link form1.text1 with form2.text1 and to update database.please explain this in detail with code writting

i wuld also like to have the same problem solved as its makin trouble 4 me aswell

My intension is by entering values in form1.text1, it should appear in form2.text1 when it is opened and database ie table1. table2 should be udpated. please any one give code and in which event we have to write code

i want to update database which is having two tables which are linked with two forms ie form1,form2 when i enter data in form1 only , so please give me code how to udpate database

Dim gcn As New ADODB.Connection

gcn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=<your access database path>;Persist Security Info=False"
gcn.Open
gcn.Execute "update <your table name> set <field name> = <value> where <criteria expression>"

is this enough?

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.