Reputation: 21
I would need to come up with a robust solution to detect when a new table is created in MS Access and then copy its content to a master table. One application is writing new data as new data tables into MS Access. This part can't be changed. Now these tables have to be copied into a master table to be picked up by an interface.
Is there a trigger in MS Access when a new table is created?
I was also thinking about a timer and then to look up all tables.
Any ideas or suggestions?
Upvotes: 1
Views: 64
Reputation: 1969
You need to trap COMPLETION of putting all the data into the table, not the initial creation and not sometime during adding data when the count may be greater then before. The copy operation cannot start until all the data is in the table. Thus the creating program needs to send a signal when its done.
Upvotes: 0
Reputation: 97131
Access does not expose an event for table creation. So you will have to check whether a new table has been created.
If you're not deleting tables, you could examine whether CurrentDb.TableDefs.Count
has increased since the last time you checked.
Upvotes: 2