I want to create a data macro on a table in my database that is triggered by the after update event and writes the content of a TempVar object in a field in another table.
When I want to use the data macro to write something else then a TempVar Object I do the following:
If Updated("ProductName") Then
Create a Record In tblLog
SetFiled
Name tblLog.tblName
Value tbleProducts
this works find and the entry is successful in tblLog, but if I wanted to use a TempVar Object like so:
If Updated("ProductName") Then
Create a Record In tblLog
SetFiled
Name tblLog.User
Value TempVars("UserID")
this does not work, I googled it around and found that you can't use the TempVar Object inside a data macro and you should use a named macro instead, but I don't know how to do that, could someone please give me an example ?
When I want to use the data macro to write something else then a TempVar Object I do the following:
If Updated("ProductName") Then
Create a Record In tblLog
SetFiled
Name tblLog.tblName
Value tbleProducts
this works find and the entry is successful in tblLog, but if I wanted to use a TempVar Object like so:
If Updated("ProductName") Then
Create a Record In tblLog
SetFiled
Name tblLog.User
Value TempVars("UserID")
this does not work, I googled it around and found that you can't use the TempVar Object inside a data macro and you should use a named macro instead, but I don't know how to do that, could someone please give me an example ?