Access | Copying a Field to Another

HiWii -  
 HiWii -
Hello,
Here is my problem, I have 2 different tables where I need 2 same fields, I would like that by filling in one field it updates the other field (which is in another table).
I don't know if this can be done directly and if programming this is difficult or not.

I need it to only update in one direction, from the THI table to the TDE table, the reverse would not be useful.

Thank you for your help!
Configuration: Windows XP Firefox 2.0.0.14

15 answers

V3n1 Posted messages 270 Registration date   Status Member Last intervention   56
 
Hi,

First of all, have you ever created a relationship between the two tables?
0
HiWii
 
Hi, thanks

I think this will be clearer:

http://img148.imageshack.us/img148/1070/prescripteurus5.jpg

I would like to copy what is in "Prescripteur" of THI into "TDE_prescrip" of TDE

Thanks.
0
HiWii
 
I searched well on Google, I found information about update queries, but I would like it to happen 'automatically', for example on an afterUpdate on the second field, as soon as we change it, the other one gets updated.

Is it possible?
0
HiWii
 
Please, I really need this info!!! Thank you.

I have the same dropdown list on 2 tables, when I change the value of the 2nd list I want the first one to take the same value!

Thank you so much!!!!
0
Malabar17 Posted messages 3 Status Member
 
Hello,

Of course, you need to establish a relationship between your tables by choosing the identical field and not forgetting to define it as the primary key.
0
HiWii
 
Thank you, but you're not helping me at all.
0
HiWii
 
Haut
0
V3n1 Posted messages 270 Registration date   Status Member Last intervention   56
 
Sorry, I completely forgot about you last time.

Have you tried changing the source (in properties) of your input box? If you set the source to the other input box you want to retrieve, it might work, right?
0
HiWii
 
Uh, well no :( lol
0
V3n1 Posted messages 270 Registration date   Status Member Last intervention   56
 
Your form should also have as source the name of the other form from which you want to retrieve the input, you see what I mean?

-FORM1 with Input Field1
=> You want to retrieve the value of Input Field1
So in your FORM2, you need to set the property Source to "FORM1".
In your FORM2, you also have an Input Field2 that will retrieve the value of Input Field1... so you change the source property, and give it "Input Field1"

Little advice: To change the form's source, you need to be in design mode, the best thing to do is first switch it to display mode, and then to design mode, click in the menu bar on display - properties.
0
HiWii
 
Whoa, I don't understand anything at all!

Because I really want this value to be recorded in the table.
At first, I was thinking of a code like: Table1.infos1=tab2.info2
After, if we can do it like that, great, but I still haven't figured out how!
0
V3n1 Posted messages 270 Registration date   Status Member Last intervention   56
 
Oh, excuse me, I was mistaken, I thought you wanted to copy a field from one form to another field in another form.
I'll see what I can do...
0
V3n1 Posted messages 270 Registration date   Status Member Last intervention   56
 
Have you ever tried with an update or insertion request?
0
HiWii
 
Well, the problem is that it's not a "direct" update. What I would like is for every time I modify or enter something in infos2, that value to be copied into infos1 of another table!

So for example, there could be an afterUpdate on infos2, with an if loop,
if <> "" then table1.infos1=infos2

Something along these lines could work, right?

Thanks anyway for your help!
0
HiWii
 
Little Up for tomorrow will be my last day!
0