how to use table triggerd after update macro (1 Viewer)

maramadan

New member
Local time
Today, 13:24
Joined
Nov 19, 2017
Messages
3
Hello Access experts
hope you are having a good day

please help me with this
I have two tables

I want to make a date macro, when I make changes to table1.num1 changes reflect on table2 by creating new record
TABLE1 have three fields ID, Name1, Num1
TABLE2 have three fields ID, Name2, Num2
the after update table macro lock like this in table1
If Updated([num1])
create a record in Table2
SetField
Name table2.ID
Value = [table1].[ID]
SetField
Name table2.name2
Value = [table1].[name1]
SetField
Name table2.num2
Value = [table1].[num1]

Why it is not working

thanks

 

Ranman256

Well-known member
Local time
Today, 07:24
Joined
Apr 9, 2015
Messages
4,337
all you need to is run an append query.
this copies the data entered to table2.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 19:24
Joined
May 7, 2009
Messages
19,169
fist, Updated() function accepts String parameter,
so you will have to change that to:

If Updated("num1")


second, make sure that ID field in Table2 is
not set as AutoNumber, othwerwise it won't
save the ID from table1.
 

isladogs

MVP / VIP
Local time
Today, 11:24
Joined
Jan 14, 2017
Messages
18,186
No problems. I've done it myself when posting similar info on both forums.
 

Users who are viewing this thread

Top Bottom