Run Macro after a table is updated or a new row is inserted

bizarre@telenet.be

New member
Local time
Today, 18:30
Joined
May 16, 2015
Messages
5
Hello,
I want to run a macro or a function in VBA after a table has been updated or a row has been added.

Now I've created a macro how is running the vba code but when I select 'AfterInsert' in the Table-tab and I choose RunDataMacro I don't see my macro...

How can I solve this. this way or is there an other way?

Greetings,

Koen
 
Use after "update event" on the Form not the table.

I would use VBA rather than a Macro.
 
Hello Rainlover,

That's no option. I don't use the form and the database is accessed from VB.NET.

I just want a copy of the table in MySQL. And so if something changes in the table it has to change in the MySQL table to...

Koen
 
Assuming your vb.net code is making the changes, then that's where you need to detect the change and make the update to MySQL
 
Hello Rainlover,

That's no option. I don't use the form and the database is accessed from VB.NET.

I just want a copy of the table in MySQL. And so if something changes in the table it has to change in the MySQL table to...

Koen

Shame you did not say this in the beginning.

Is there any other things we need to know.

Perhaps you could start by saying why you want to maintain two tables instead of just the one like other people do.
 
Ok, here is the full story. I made a complete POS system in VB.net based on a Access database. The POS system need to be registered by the government and they know a password on a Access DB is nothing worth, so they want a copy of the sales table in MySQL. Because MySQL is more secure and they don't want that there is write-permission for the user. (So they can't cheat and delete some rows...) So I thought to copy the inserted/updated rows from the sales table to a MySQL table. That would be much easier and quicker than converting the whole program from OleDB to MySQL...
 
Others may wish to comment with their point of view.

My suggestion is to have MySQL as your Back End. One set of tables means less possibility of mistakes. As I said this is my opinion and that you should seek other's.
 

Users who are viewing this thread

Back
Top Bottom