Results 1 to 8 of 8

Thread: Append Query

  1. #1
    Join Date
    Dec 2003
    Location
    Derby, England
    Posts
    38

    Red face Unanswered: Append Query

    Hi

    i am doing a database in Access 2000 where i am using a append query to store data both on the main table and then copy all the data to another table.

    However all is well except that if i press the append button i have created(linked to a query) more than once i get an error message attahced in a jpf format.

    does anyone know of a way where i can make the append query only save data that is new and not try save everything on the form. which results in the error message

    many thanks
    Kabir Hussein

    http://www.angelfire.com/theforce/precious/index.html

  2. #2
    Join Date
    Dec 2003
    Location
    Derby, England
    Posts
    38
    sorry attachment doesnt work for some straneg reason
    Attached Thumbnails Attached Thumbnails appenqry.bmp  
    Kabir Hussein

    http://www.angelfire.com/theforce/precious/index.html

  3. #3
    Join Date
    Dec 2003
    Location
    Derby, England
    Posts
    38
    sorry attachment doesnt work for some strange reason
    Kabir Hussein

    http://www.angelfire.com/theforce/precious/index.html

  4. #4
    Join Date
    Dec 2003
    Location
    Toronto, Ont. Canada
    Posts
    238

    Re: Append Query

    Originally posted by kabir_hussein
    does anyone know of a way where i can make the append query only save data that is new and not try save everything on the form. which results in the error message

    many thanks
    If you have a primary key in the table the data is being appended to this would be simple... Just add a Where clause to your query... Something like... "WHERE fldID Not In ("Select fldID From tblMain;")

    So if fldID in the table contained values like 1,2,3,5,6,7 and 8... And fldID for the records on your form contained values like 2,3,4,8,9,10... Only records for 4,9 and 10 would be added to your table...

    I hope this makes sense and helps a bit...

  5. #5
    Join Date
    Dec 2003
    Location
    Derby, England
    Posts
    38
    here is what two tables i am trying to append i have tried using some code but i get an error message saying data mismatch error

    what could i be doing wrong
    Kabir Hussein

    http://www.angelfire.com/theforce/precious/index.html

  6. #6
    Join Date
    Dec 2003
    Location
    Derby, England
    Posts
    38
    soory this is very annoying i cant seem to be able to attach attachments
    Kabir Hussein

    http://www.angelfire.com/theforce/precious/index.html

  7. #7
    Join Date
    Dec 2003
    Location
    Toronto, Ont. Canada
    Posts
    238
    Originally posted by kabir_hussein
    here is what two tables i am trying to append i have tried using some code but i get an error message saying data mismatch error

    what could i be doing wrong
    Check that you are using single quotes around string values and # signs around date values... (and that you aren't using either around numeric values) in your SQL statement...

  8. #8
    Join Date
    Dec 2003
    Location
    Derby, England
    Posts
    38
    Here is the code i am using to make the append query only save data that is not in the append table already

    "where [tenderlink]![TenderlinkID] not In (select [tenderlink]![TenderlinkID] )"

    The table i am appending is called tenderbackup and the table i am appending from is called tenderlink. tenderlinkID is the PK of the main table it is also the PK of the append table. both tables have same fields

    Am i using the right code?

    many thanks
    Kabir Hussein

    http://www.angelfire.com/theforce/precious/index.html

Posting Permissions

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