|
Function BeforeAdd(dict)
'
Parameters:
' dict - Scripting.Dictionary object.
' Each field on the Add form represented as 'Field name'-'Field
value' pair
'********** Check if specific record exists ************
set
rsExists = dal.AnyTable.Query("AnyColumn='AnyValue'","")
if not rsExists.eof
then
' if record exists do something
else
' if dont exist do something else
end if
rsExists.Close
: set rsExists = Nothing
BeforeAdd = True
' set BeforeAdd to True if you like to proceed with adding new record
' set it to False in other case
End
Function
|