Results 1 to 2 of 2
  1. #1
    beaudave is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2013
    Posts
    1

    Cool How do I combine almost identical linked Excel worksheets into one table?


    I'm a newb when it comes to Excel and Access. I've been teaching myself how to use them. We send thank you letters to the new business customers that we perform weekly mail merges from Access. Several, but not all, of the agents also send birthday postcards to their customers every year. Each agent has their own worksheet in a single Excel workbook with identical headers. The first header is AgentNum and each agent has a unique number. I have each worksheet linked into Access so the data will update each week. The birthdays have been separated into 2 columns, one for month and the other for day. No years are needed or wanted since Excel would sort them on years and throw the sequence off. In Access, I'm trying to create a form/query/report, whatever, that we can enter a StartDate and an EndDate in order to get the next week's birthdays in a single list for all of the agents. I've been through hours of reading and days of experimenting to no avail. Help please?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,619
    Combining all the records from the multiple links will mean a UNION query. There is no wizard or designer for UNION, must type in SQL view.

    SELECT ClientName, BirthMonth, BirthDay, "Sheet1" AS Source FROM link1
    UNION SELECT ClientName, BirthMonth, BirthDay, "Sheet2" FROM link2
    ....;

    Up to 50 lines allowed in UNION

    Then use that query as source for another query. Try filter parameters like:

    SELECT * FROM qryALL WHERE Format([BirthMonth],"00") & Format([BirthDay],"00") Between Format([StartM],"00") & Format([StartD],"00") And Format([EndM],"00") & Format([EndD],"00")

    Instead of the input popups, can reference controls on form for criteria.
    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.

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

Similar Threads

  1. Exporting to Excel - All Worksheets Highlighted
    By kristyspdx in forum Import/Export Data
    Replies: 3
    Last Post: 02-26-2013, 05:42 PM
  2. How to copy and paste between worksheets in Excel?
    By Ronald Mcdonald in forum Programming
    Replies: 6
    Last Post: 05-26-2012, 10:40 PM
  3. Replies: 7
    Last Post: 08-18-2011, 02:18 PM
  4. How To Combine 3 Linked Excel Worksheets?
    By cadsvc in forum Access
    Replies: 2
    Last Post: 04-26-2011, 10:16 AM
  5. Deleting Worksheets on a Excel workbook
    By BED in forum Programming
    Replies: 0
    Last Post: 07-27-2010, 01:20 PM

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