Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2011

    Unanswered: Automatically refresh table on database open IF not yet refreshed today

    I have created a database with front end/back end shared by multiple users. It is linked by odbc to SQL tables that are refreshed each night. In my database, I need to run a make table query of the SQL tables if they haven't yet been copied that day. I added a new field in the make table query called "Created_Date" so I can test to see if the table copy in the database was created on a previous date.

    Is there some way that upon opening the database, I can test the date in the Created_Date field against today's date and then have a macro run to make the tables only on the condition that they are out of date? Originally I had a message box appear if any of the tables were out of date and then the user had to push a button to update. I would prefer if it could be done automatically.


  2. #2
    Join Date
    Mar 2009
    Provided Answers: 14
    Not sure to understand the logic of the process you describe but if you want to run something automatically when the database is open, you can create a macro named AutoExec and have it call a function that will perform the wanted tasks.
    Have a nice day!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts