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

table level triggers

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

Table Level Triggers

ResolvedVersion 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:

Change The Default Font in Access 2003

You can change the default font in Access 2003 so that whenever you create a new database your preferred font is automatically set.

To change the default font:

1.From the menu bar select Tools.
2.Click Options.
3.Go to the Datasheet tab:
4.In the Default font section select your preferred font from the list of fonts e.g. Arial.
5.Select your preferred size from the size menu e.g. 12.
6.Click Apply.

Click on the Tables/queries tab:
1.In the Query Design font section select your preferred font from the list of fonts e.g. Arial.
2.Select your preferred size from the size menu e.g. 12.
3.Click Apply.
4.Click OK.

The default font for Access has now been changed.

View all Access hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.1 secs.