Results 1 to 3 of 3
  1. #1
    MFS is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2009
    Location
    Ohio
    Posts
    235

    Moving a field from a linked SQL Table to Access Table

    Been awhile since I've posted and I am hoping this is the correct forum to post this thread.

    I have an SQL database that captures profile data for our product and prints a report once the product has been finished. The data going into the SQL table is going through a "black box" and is proprietary to the manufacturer that built the server/machine so I really do not want to mess around with the SQL database. Once the report is printed and new product begins the SQL table is cleared and begins collecting data once again.
    I'm wanting to save some of this data for historical review
    So what I've done is linked a table within Access to the SQL Table. I am looking to have a couple of the SQL table fields be moved to another Access local table each time the new data comes in.


    Can this be achieved, if so could someone help with explaining how ?

    Thank You in advance,

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,524
    you can import the field to the local table. You cant MOVE it from the sql table without SQL db manager software.
    just ignore it if you cant remove it.

  3. #3
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,791
    You're asking how to copy data from the linked table to the local table? You run an append query. If the sql data is volatile, you'd need to run an update query, which I would do first, then append. To update, you'd put the sql table and field names as the values to update to in the query design grid and join on the PK fields. To append, I find it easier to construct the sql statement and execute in code to avoid the Access prompt and error messages about not being able to append all records when unique indexes are involved. It's one of the rare times I turn off warnings and just execute the sql (error handling routine to ensure they're turned back on is a must IMO). Existing records are not duplicated and no warnings and no need for complicated joins or nested/sub queries to avoid existing records.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

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

Similar Threads

  1. Replies: 1
    Last Post: 09-30-2020, 09:45 AM
  2. Replies: 1
    Last Post: 11-15-2019, 04:04 PM
  3. Replies: 1
    Last Post: 02-23-2016, 05:00 PM
  4. Replies: 5
    Last Post: 04-12-2012, 05:20 AM
  5. Moving row to another table
    By bigmacholmes in forum Programming
    Replies: 2
    Last Post: 10-03-2011, 12:09 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