table level triggers

Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

Forum home » Delegate support and help forum » Microsoft Access VBA Training and help » Table Level Triggers

Table Level Triggers

resolvedResolved · High Priority · Version 2016

Manny has attended:
Access Intermediate course
Access Advanced course

Table Level Triggers

Hi Guys,

Is there anyway to set up a table level trigger event?

i am building a huge bank account reconciliation. This is what i envisage:

- I will pick up all the cash transactions files and load them all into a master table.
- This will essentially "stamp", all the transactions with an autonumber. (tbl_masterTrans)
- After this has happened, i want this to be loaded into varaious other tables. eg. all ledgers go into a ledger table etc (like my other post, which now works fine)

Once these transactions have been moved into the various tables, i want to be able delete all the data in the master (tbl_masterTrans) - this would esentially be a wash table, to only stamp with an autonumber and then funnel the data into the various tables. It may not be best practise, but i believe this will organise the data very cleanly, and is the only way to have a unique ID for all the transactions. I am unable to set a primary key otherwise because legitimately, we could see 2 cash postings with the exact same ecomic parameters.

Therefore my main question is can i run a table event after inserting - without using the macro tools (i know i can use this). I would like to be able to do so using VBA. may sub ontableinsert event?

Manny

RE: Table Level Triggers

Hi Manny,

Thank you for the forum question.

I understand what you want, but I am afraid that there is no easy solution or may be no solution at all.

Events are triggered in private modules and only forms have private modules in Access. The table macro events are stored somewhere but I do not know where.

You can create events in a class modules and without having any experience creating class modules events and triggers, I cannot tell you if you can do it.

I am using class modules to develop my own objects with properties and methods.



Kind regards

Jens Bonde
Microsoft Office Specialist Trainer

Tel: 0207 987 3777
STL - https://www.stl-training.co.uk
98%+ recommend us

London's leader with UK wide delivery in Microsoft Office training and management training to global brands, FTSE 100, SME's and the public sector

 

Training courses

 

Training information:

Welcome. Please choose your application (eg. Excel) and then post your question.

Our Microsoft Qualified trainers will then respond within 24 hours (working days).

Frequently Asked Questions
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.


 

Access tip:

How To Find All Overdue Accounts?

To find overdue accounts create a filter that compares today's date with the Invoice Date in the table. To do this:

1. Open the Query in Design View
2. Select the field for the filter and in the criteria row enter:

<Date()

This filter returns records where the Invoice Date is before today's date.

This filter can be manipulated if, for instance, Invoices are due 15 days after the Invoice Date. For this the filter would be:

<Date()-15

This filter returns records where the Invoice Date is 15 days before today's date.

View all Access hints and tips


Server loaded in 0.09 secs.