dreampolice
Technical User
I looked on Google and other places and still cant find out if Access 2003 has Triggers. Can you create a Trigger in Access 2003??
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
But only if the desired trigger action is to merely update or delete related records indiscriminately.genomon said:I think you can still define cascading behavior in MSAccess Table Relations, which can serve the same pupose as triggers in SQL Server.
Option Compare Database
Option Explicit
Public Function MyTriggerForQry1(MyArgument As String) As Boolean
Dim db As DAO.Database
Set db = CurrentDb
Select Case UCase$(MyArgument)
Case "001" 'Update another Table
db.Execute "UPDATE AnotherTable Set SomeOtherfield='Hi There Again!' WHERE SomeOtherfield='" & MyArgument & "'"
Case "002" 'Allow a change in the record
MyTriggerForQry1 = True
Case Else 'No changes allowed under some condition
MyTriggerForQry1 = False
End Select
End Function
UPDATE SomeTable SET SomeField ='Hi There'
WHERE (MyTrigger(SomeField)=True)