CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Me again

  1. #1
    Join Date
    Jun 2001
    Posts
    29

    Me again

    I keep getting this error message when I try to save a record which I have tried to edit using my form. It could simply be a problem with my form I'm not sure but I was wondering if I need to create an inner join or something to that effect. Here is the message "Cannot find a record in the table 'tblItems' with key matching field(s) 'oitemItem'. The tables are joined in my query with a one to many relationship. Any advice?

    Sorry for all the questions, I am a newbee to programming and databases and I am the only one at my company in my field.

    Liza

  2. #2
    Join Date
    Jan 2000
    Location
    Olen, Belgium
    Posts
    2,477

    Re: Me again

    Ok, me again

    The error you are getting is because you have a relation set between two tables. In one of the table, there is a field that refferences another field in the other table. Make sure that the value you add to your table (the one passed by the form) exists in the table at the one-side of the relation.

    This often happens when you use a combobox or something, and you type in the value rather than selecting it from the list. In that case, the combobox might not recognize it as an item of the list, and pass a wrong value.

    Tom Cannaerts
    [email protected]

    Programming today is a race between software engineers striving to build bigger and better idot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning -- Rich Cook
    Tom Cannaerts
    email: [email protected]
    www.tom.be (dutch site)

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured