onRowAdded Event

  • Thread starter Thread starter Nicolas
  • Start date Start date
N

Nicolas

Can I have a function/Macro which will be trigger when a new row have been
added to a specific table. This should do something like the following

dim numOfRows as Integer=0
Function onRowAdded() as Integer
'copy the newly added row to a text file for third party log
dim thisRowText as String
thisRowText = Col(0) & "~" & Col(1)
'Save thisRowText

numOfRows= Application.CurrentDb.TableDefs(0).RecordCount

thisRowtext=Nothing
onRowAdded=numOfRows
End Function
 
Sounds like you're talking about what are called triggers in other DBMS.
Access doesn't allow them (although Access 2010 will have them, in the form
of Data Macros)
 
Back
Top