Results 1 to 2 of 2
  1. #1
    3 Star Lounger
    Join Date
    Jul 2001
    Thanked 0 Times in 0 Posts

    Append problems (Access 2000)

    Can i get a help with my append function that fails to append and the following
    message appears:
    you cannot add or change a record because a related record is required in table tblOffers
    I understand i had to delete the unmatched records but in spite of that i get the error:
    nn my code below i first try to delete these records and then append.:

    Dim SQL As String
    SQL = "DELETE tblofferdetails.*, tblOffers.offerid" & _
    " FROM tblOffers RIGHT JOIN tblofferdetails ON tblOffers.offerid = tblofferdetails.offerid" & _
    " WHERE (((tblOffers.offerid) Is Null));"
    CurrentDb.Execute SQL
    AppendToTable "TblOfferDetails1", "TblOfferDetails", "offerid"

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Thanked 31 Times in 31 Posts

    Re: Append problems (Access 2000)

    We're not going to get far this way. Could you post a stripped down copy of your database? See <post#=401925>post 401925</post#> for instructions.

Posting Permissions

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