|
Function BeforeAdd(dict)
'
Parameters:
' dict - Scripting.Dictionary object.
' Each field on the Add form represented as 'Field name'-'Field
value' pair
'********** Save new data in another table ************
strSQLSave =
"INSERT INTO AnotherTable (Field1, Field2) values ("
strSQLSave = strSQLSave & dict(Field1) & ","
strSQLSave = strSQLSave & dict(Field2)
strSQLSave = strSQLSave & ")"
dbConnection.Execute strSQLSave
BeforeAdd = True
' set BeforeAdd to True if you like to proceed with adding new record
' set it to False in other case
End
Function |