Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2014
    Posts
    2

    Unanswered: MS Access on "no corresponding record on the "one" side" error

    Hi,

    i've read such error occur by other pple but i can't seem to find out what happen to mine as it all make sense to me.

    PaymentType(PaymentType_ID (PK), PaymentType)
    ExchangeRate(CurCode (PK), RateDate, Rate)
    PaymentMethod (Receipt_ID (PK), PaymentType_ID(FK), CurCode(FK))

    when i tried use a form to update paymenttype_ID in paymentmethod table. it give me the error "no corresponding record on the "one" side" error.

    I've no idea whats wrong with such relationship.

    i've implement referral integrity and PaymentType & Exchange Rate are 1-many relationship to PaymentMethod respectively.

    btw to add on, PaymethodMethod is a Child 1-1 to Sales Invoice.
    I did that so that i do not squeeze all attributes into Sales Invoice alone. is this that cause the issue ?
    Last edited by sakii; 03-04-14 at 12:17.

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    check your relationships are defined correctly
    ...make certain that the one to many reflects the one(parent) to many (child) tables and not the other way round
    check your data exists
    ...to insert a value into a row on the 'child' (foreign key) table requires that the same value must pre-exist in the 'parent' (primary) table

    this message suggests to me that you are trying to insert a value for payment type which doesn't already exist in paymenttypes. I will admit that Im a throwback to the old ways of doing thngs, but I tend to have a masterdata section where all the types/codes etc are defiend, and then a data entry area where those types are selected by a user from a combo or list box. but I dont' allow users to add codes willy nilly in the data entry area. that must be done using the master data forms even if the data entry is being done by the same person. this model requires that you include a mechansim of reloading the data entry combo boxes as required (usually either a button adjacent to each combo or one button REFRESHes or REQUERY(ies) all combo boxes
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    Mar 2014
    Posts
    2
    Quote Originally Posted by healdem View Post
    check your relationships are defined correctly
    ...make certain that the one to many reflects the one(parent) to many (child) tables and not the other way round
    check your data exists
    ...to insert a value into a row on the 'child' (foreign key) table requires that the same value must pre-exist in the 'parent' (primary) table

    this message suggests to me that you are trying to insert a value for payment type which doesn't already exist in paymenttypes. I will admit that Im a throwback to the old ways of doing thngs, but I tend to have a masterdata section where all the types/codes etc are defiend, and then a data entry area where those types are selected by a user from a combo or list box. but I dont' allow users to add codes willy nilly in the data entry area. that must be done using the master data forms even if the data entry is being done by the same person. this model requires that you include a mechansim of reloading the data entry combo boxes as required (usually either a button adjacent to each combo or one button REFRESHes or REQUERY(ies) all combo boxes

    yup i've that data existed , SalesRecord table have another child table(Item Sold) which gives 1-many relationship due to a composite primary key.
    SalesRecord also have a child table PaymentMethod but is a 1-1 relationship because i'm matching Receipt_ID(PK) in both table together.

    Somehow when i generate the form and update ItemSold table first before PaymentMethod, the error doesn't occur.

    This is werid, whats happening ?

    The masterlist (SalesRecord) is always updated before its child (PaymentMethod & ItemSold) is updated.
    If i update ItemSold before PaymentMethod, error occurs.
    If i did another way round, error DOES NOT occur.

Posting Permissions

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