genericjanedoe
Technical User
Is there anyway of ensuring that a database carries out a macro only once during a user session?
I ask because I have developed an archive database in which to export all the older records from a project database. When the "archive record" field is filled in, a macro exports the record into a "holding" database and deletes it from the project database. (I have to have this holding database because each new export re-creates and overwrites the holding database.)
When I go into the archive database, an import macro imports records from the holding database and adds it as a new record into the archive. This macro is set up to run the minute I navigate away from the main menu. In order to stop the archive creating a duplicate record every time I move away from the menu page, I have the macro delete the holding database once the record has been imported.
So far, so good.
However, now of course when I navigate the archive database, the import macro tries to find the records in the now non-existent holding database, and I am faced with an "Input Data" dialogue box which I have to keep cancelling out of.
Any ideas as to what I do next? Many thanks
I ask because I have developed an archive database in which to export all the older records from a project database. When the "archive record" field is filled in, a macro exports the record into a "holding" database and deletes it from the project database. (I have to have this holding database because each new export re-creates and overwrites the holding database.)
When I go into the archive database, an import macro imports records from the holding database and adds it as a new record into the archive. This macro is set up to run the minute I navigate away from the main menu. In order to stop the archive creating a duplicate record every time I move away from the menu page, I have the macro delete the holding database once the record has been imported.
So far, so good.
However, now of course when I navigate the archive database, the import macro tries to find the records in the now non-existent holding database, and I am faced with an "Input Data" dialogue box which I have to keep cancelling out of.
Any ideas as to what I do next? Many thanks