Results 1 to 6 of 6
  1. #1
    Join Date
    Jan 2004
    Location
    Berkshire, UK
    Posts
    22

    Unanswered: Problem to solve...

    Hi All,

    Being relatively new to Access, this problem will seem like a breeze to most of you, but would help me greatly.

    I am often tasked with doing mailings at work and then organising follow-up via telemarketing. My problem: I have a database in Access containing one table. I have since added a few fields so that I could run queries e.g. of 1000 records, I only needed to mail 187. I distinguished these with a field called mail (y/n format) and queried against it. I then mailmerge to the query.

    After carrying out the mailing, I had to send this list to the telemarketing company I use, which they requested in Excel. I sent them this as a direct export from the query.

    I have since had the data returned to me (again in Excel) but with many amendments and a couple of new fields.

    My question: is there a process that allows me to overwrite the existing data in the table with the updated data from Excel without duplication or damaging the other data. I have assumed I need to create new fields in the table to allow for the new fields in Access.

    Can anyone help?

    Many thanks,

    Big John

  2. #2
    Join Date
    Oct 2003
    Location
    São Paulo - Brazil
    Posts
    91
    Hi Big Jonh

    Do u have a way to identify a client ? I mean, a field that works as a primary key ?

    (Ah! If u do have, this field must be in the excell file that u import)
    My environment: Windows XP/ Access 2000 - Using Microsoft DAO 3.6 Library

  3. #3
    Join Date
    Jan 2004
    Location
    Berkshire, UK
    Posts
    22
    Hi Mixirica,

    Yes - I have an ID field which is currently the primary key in the database table. I also have that same ID in the Excel spreadsheet.

    I assume that as the ID numbers will be the same, it may cause difficulty if I try an import the spreadsheet data, with one being the primary key.

    However, I bow to your expertise.

    Regards.

    Big John

  4. #4
    Join Date
    Oct 2003
    Location
    São Paulo - Brazil
    Posts
    91
    In order to solve this, u should use Recordsets.

    Do u know how to use them ?
    My environment: Windows XP/ Access 2000 - Using Microsoft DAO 3.6 Library

  5. #5
    Join Date
    Jan 2004
    Location
    Berkshire, UK
    Posts
    22
    I've heard of them, but I'm not sure exactly what they are. Is it easy to explain? I tend to pick things up quite quickly, so maybe something will sound familiar.

    Thanks for your help so far.

    John

  6. #6
    Join Date
    Jan 2004
    Location
    Jersey, UK
    Posts
    108
    I'm not sure what Mixirica means by Recordsets; it could be the same as what I'm recommending: just do an update query.

    Either link to or import the spreadsheet. Create a new query; link the tables by your id field and then drop in the fields you want to update. In the 'Update To' box type in this code:

    spreadsheettablename!spreadsheettablefield

    *obviously you need to change the above code to have your table and field names.

    When you run this query it will update your existing data with data from your imported table WHERE the id's agree. It's a good idea to check the number of records that are being changed as this number should agree to the number of records on your spreadsheet.


    Regards - Andy

Posting Permissions

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