Results 1 to 4 of 4
  1. #1
    Guitarzan is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Aug 2012
    Posts
    15

    Need query to move existing (old query) to new query/table?

    I apologize for the title in advance, it's hard to sum up my issue. I have a table called "Customers". Each week I import an excel file into this table and replace the old data with the new data. I only want the new excel data in this table.

    I have a query called "Current Customers" that is run on the table "Customers" to find out who is a current customer.



    I want to have a query? or table? called "Last weeks customers" where it would take the data from the "current customers" from the previous week and throw them into this query/table.

    In other words, I'll import the excel each monday, I'd like 2 queries to show the current customers and last weeks customers. Last weeks should be a snapshot of the query "current customers" from the time i ran it last week. Confused yet? lol I know I am.

  2. #2
    Guitarzan is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Aug 2012
    Posts
    15
    Ok so I added a create table query so when I open the db I can click the create table query and it will make a table of the customers from the previous week. Then i can import my data and run the current customer query and have both.

    Is there any way to automate running the query upon launch of the db?

  3. #3
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,948
    A process that routinely modifies structure of db is usually not a good idea.

    Instead of creating a table each week, just delete records from this intermediate table and import the new set.

    Automate with an Autoexec macro or code behind a form set to open by default when the db opens.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  4. #4
    Guitarzan is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Aug 2012
    Posts
    15
    Quote Originally Posted by June7 View Post
    A process that routinely modifies structure of db is usually not a good idea.

    Instead of creating a table each week, just delete records from this intermediate table and import the new set.

    Automate with an Autoexec macro or code behind a form set to open by default when the db opens.
    Thanks! Just did this and everything is working wonderfully.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Add a table to an existing query
    By ZodiacPilot in forum Queries
    Replies: 5
    Last Post: 09-28-2015, 06:38 PM
  2. Replies: 4
    Last Post: 12-11-2013, 02:15 PM
  3. Move query data to a new table using VBA
    By Bob Blooms in forum Programming
    Replies: 1
    Last Post: 09-23-2012, 08:33 PM
  4. Replies: 3
    Last Post: 08-07-2012, 03:48 PM
  5. Replies: 3
    Last Post: 04-12-2012, 03:59 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums