Results 1 to 6 of 6
  1. #1
    Join Date
    Mar 2006
    Posts
    73

    Exclamation Unanswered: Update Query Not exactly Updating..

    Hey guys, been awhile since I've posted a question...but anyways..


    I'm having a problem with an update query. What I'm trying to do is take a linked version of a table from a seperate database that contains the same data as the one on my other database. And what I need to have happen is, when ever that table is updated, to be able to update the table on my seperate database.

    here's an example to hopefully let ya better understand.

    Database One - Set in office
    Table1 - Contains Data

    Database Two - Travel Database
    Table1 - Contains Data from Database One

    • Table1 from Database Two gets updated with new data
    • Person returns to Office needs to place on the Office version of the Database(so Database One)


    So with this I need the data that was entered which is in Table1, which is linked into Database One, in an update query. But my problem is it's not taking in the new data from the version off of Database Two.

    Is there a way that I can have this happen, or am I only dreaming of ways of doing this and am forced to the good ol' Cut and Paste Method?

    Any help or input would be great..and any further questions I'll be happy to answer as best as possible.

    Thanks

  2. #2
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    What triggers the update? Why not have a companion query to update the other database table ...
    Back to Access ... ADO is not the way to go for speed ...

  3. #3
    Join Date
    Mar 2006
    Posts
    73
    What should trigger the update is when there's a new record in the travel one...I've now tried doing an append query where it should append the fileds that aren't equal...this is the code behind the query..


    INSERT INTO [Service Records] ( ServiceRecordID, [Service Report #], ServiceDate, EmployeeID, Description, ContactID, ProjectID, [Dash #], [Service Type], [Test Speed], [Test containers], [Fit Test], [Fit Notes], [Tech Signature], [Customer Signature], [Work Requested], [Customer Comments], [Static Speed], [Jog Speed], [Line Speed], [N/A For Speed], [No Containers], [Mould or Test Container], Containers, [Full Production], [N/A For Service], [Checked Loose/Tight Cont], [Out Of Time Cond], [Checked Loose/Tight Cores] )

    SELECT [Service Records3].ServiceRecordID, [Service Records3].[Service Report #], [Service Records3].ServiceDate, [Service Records3].EmployeeID, [Service Records3].Description, [Service Records3].ContactID, [Service Records3].ProjectID, [Service Records3].[Dash #], [Service Records3].[Service Type], [Service Records3].[Test Speed], [Service Records3].[Test containers], [Service Records3].[Fit Test], [Service Records3].[Fit Notes], [Service Records3].[Tech Signature], [Service Records3].[Customer Signature], [Service Records3].[Work Requested], [Service Records3].[Customer Comments], [Service Records3].[Static Speed], [Service Records3].[Jog Speed], [Service Records3].[Line Speed], [Service Records3].[N/A For Speed], [Service Records3].[No Containers], [Service Records3].[Mould or Test Container], [Service Records3].Containers, [Service Records3].[Full Production], [Service Records3].[N/A For Service], [Service Records3].[Checked Loose/Tight Cont], [Service Records3].[Out Of Time Cond], [Service Records3].[Checked Loose/Tight Cores]

    FROM [Service Records3]

    WHERE ((([Service Records3].ServiceRecordID)<>[Service Records].[ServiceRecordID]) AND (([Service Records3].[Service Report #])<>[Service Records].[Service Report #]) AND (([Service Records3].ServiceDate)<>[Service Records].[ServiceDate]) AND (([Service Records3].EmployeeID)<>[Service Records].[EmployeeID]) AND (([Service Records3].Description)<>[Service Records].[Description]) AND (([Service Records3].ContactID)<>[Service Records].[ContactID]) AND (([Service Records3].ProjectID)<>[Service Records].[ProjectID]) AND (([Service Records3].[Dash #])<>[Service Records].[Dash #]) AND (([Service Records3].[Service Type])<>[Service Records].[Service Type]) AND (([Service Records3].[Test Speed])<>[Service Records].[Test Speed]) AND (([Service Records3].[Test containers])<>[Service Records].[Test containers]) AND (([Service Records3].[Fit Test])<>[Service Records].[Fit Test]) AND (([Service Records3].[Fit Notes])<>[Service Records].[Fit Notes]) AND (([Service Records3].[Tech Signature])<>[Service Records].[Tech Signature]) AND (([Service Records3].[Customer Signature])<>[Service Records].[Customer Signature]) AND (([Service Records3].[Work Requested])<>[Service Records].[Work Requested]) AND (([Service Records3].[Customer Comments])<>[Service Records].[Customer Comment]) AND (([Service Records3].[Static Speed])<>[Service Records].[Static Speed]) AND (([Service Records3].[Jog Speed])<>[Service Records].[Jog Speed]) AND (([Service Records3].[Line Speed])<>[Service Records].[Line Speed]) AND (([Service Records3].[N/A For Speed])<>[Service Records].[N/A For Speed]) AND (([Service Records3].[No Containers])<>[Service Records].[No Containers]) AND (([Service Records3].[Mould or Test Container])<>[Service Records].[Mould or Test Container]) AND (([Service Records3].Containers)<>[Service Records].[Containers]) AND (([Service Records3].[Full Production])<>[Service Records].[Full Production]) AND (([Service Records3].[N/A For Service])<>[Service Records].[N/A For Service]) AND (([Service Records3].[Checked Loose/Tight Cont])<>[Service Records].[Checked Loose/Tight Cont]) AND (([Service Records3].[Out Of Time Cond])<>[Service Records].[Out Of Time Cond]) AND (([Service Records3].[Checked Loose/Tight Cores])<>[Service Records].[Checked Loose/Tight Cores]));

  4. #4
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    YIKES!!!! That's a monster!

    Now, how do you detect a new record?
    Back to Access ... ADO is not the way to go for speed ...

  5. #5
    Join Date
    Mar 2006
    Posts
    73
    well hopefully it should take in the fact that certian records aren't equal..and then insert it into the table...but apprently it's not..cause it's not liking the data from the liked table at all...

  6. #6
    Join Date
    Mar 2006
    Posts
    73
    I've been working on this all day and wondering if I can do it this way..

    is it possible to do say

    SELECT (insert fields you are selecting here) and (the fields from the table to be updated)

    From (insert name of tables here)

    INSERT INTO take all the records from first set of fields and insert into second set of fields

    Would I be able to do something like this?

Posting Permissions

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