question about cope vba

qupe

Registered User.
Local time
Today, 05:09
Joined
Feb 15, 2016
Messages
51
hi all
i had made a main table and i put a yes/no field .
i want if i check this check box vba will copy one cell value from main to another field and put it as new record every time i Change the value of the record or cell in the main filed ?


thank for help :)
 
Last edited by a moderator:
Please clarify what you mean by cell. Also if you explain your data with specifics it might be easier to understand what you want.

That large font won't help you get any help either.
 
Please clarify what you mean by cell. Also if you explain your data with specifics it might be easier to understand what you want.

That large font won't help you get any help either.

ok i mean with cell which comes from The intersection of row and column
and the data type is date and number .
from a while i made a code to update time in mtable.watch cell when it change in mtable. date and mtable.time so now i want to copy these data to another related table

9FU5wyt.jpg


from mtable.watch to track.watch

LIYF1ku.jpg



sorry for big font :D
 
I find you are still unclear in expressing exactly what you want.

For a start, the use of the term "cell" is not appropriate with Access.

Let me re-state what you might want which is to copy records (or maybe just one field) from mtable where an unspecified Yes/no field ( I see two in your screen shot) to another table.

Your screen shot shows the table having the field 'Watched' yet you say mtable.watch is to be copied. Is that another field or a typo?
 
First I don't see any forms mentioned in this. Unfortunately Access does not have any events or triggers associated with tables so you will have to have a form for at least the Mtable. Assuming such a form named MForms, bound to the Mtable and assuming the Yes/No field is named track then you could put code in the after update event of the MForm to do an insert into the track table when the track Yes/No field is checked. The code would be something like.

Code:
If Me.track Then
      CurrentDb.Execute "INSERT INTO [track] (watch) VALUES ('" & Me.watch & "')", dbFailOnError
End If
 
I find you are still unclear in expressing exactly what you want.

For a start, the use of the term "cell" is not appropriate with Access.

Let me re-state what you might want which is to copy records (or maybe just one field) from mtable where an unspecified Yes/no field ( I see two in your screen shot) to another table.

Your screen shot shows the table having the field 'Watched' yet you say mtable.watch is to be copied. Is that another field or a typo?

yes you are right i have two tables each one has watched field.

the idea is when i check the trace field it will copy episode number and it's date from mtable to track table every time i change the value in the mtable of course with keep en it in the mtable
 

Users who are viewing this thread

Back
Top Bottom