table level triggers

TrustPilot

starstarstarstarstar Excellent

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

Table Level Triggers

resolvedResolved · High Priority · Version 2016

Fri 31 May 2019, 17:14 replyReply Delegate Manny said...

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

For upcoming training course dates see: Pricing & availability

Fri 31 May 2019, 21:10 replyReply Trainer Jens said...

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: 0845 5194 797
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

 

Live dates & prices

 

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:

Convert A Form Into A Report

If there is a form that you want to to save as a report:

1. Open that form in Design View
2. Select File and Save As
3. In the Save As Dialog box Select Report

The system creates a report based on the form.

View all Access hints and tips


TrustPilot
TrustScore 9.6       1034 reviews