Page 1 of 2 12 LastLast
Results 1 to 15 of 18
  1. #1
    Join Date
    May 2006
    Posts
    8

    Red face Unanswered: Simple but Annoying MS ACCESS problem

    Hi Guys

    I'm new here and this is my first question. I am building a database for a university project it is due in in 5 hours lol. Well the problem is i have about 4 forms and 4 tables ( quite a simple database) The problem is when i try to enter or use the drop down box on my form it comes up with the error :

    The changes you requested to the table were not successful because they would create duplicate values in the index, primary key, or relationship. (Error 3022)

    I think it is something to do with my relationships i have tried alot of experimenting but i cannot work this out, if anyone could please help it would be highly appreciated. I have uploaded the database so anyone can have a closer look at whats wrong.

    I have msn ( craigydoolan@hotmail.com)
    Or you can reply here

    Thanks again sooooo much if anyone can help!!!

    Craig
    Attached Files Attached Files

  2. #2
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    Nothing like waiting till the last minute...

    Is this all access, or access data project with sql server?

    Not that it's going to buy you alot...most people here don't do homework.

    Pat's been know to help though...Rudy too I beleive.
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  3. #3
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    couple of points

    first, we don't generally do homework -- instead, we can give you general guidelines to specific questions, but uploading your database isn't very specific

    second, the fact that it's so close to deadline is irrelevant -- as the old saying goes ...
    failure to plan on your part does not constitute an emergency on our part
    third, why would you post an access question in the sql server forum and not the access forum? i'm going to move the thread over there for you
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  4. #4
    Join Date
    May 2006
    Posts
    8
    Oh sorry!! i thought it was actually the same thing sorry about that and yeah its my burden and im probly going to fail i jsut thought i cud get it done i dont want someone to do it for me i just need guidelines as to what would cause the error as ive been testing and getting annoyed for the last 4-5 hours

    Thanks so much guys.

  5. #5
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    okay, couple hours left, i can maybe try to walk you through it

    in your own words, what do you think causes an error message like "because they would create duplicate values in the index, primary key, or relationship."
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  6. #6
    Join Date
    May 2006
    Posts
    8
    Yay! Well it means theres 2 values that are conflicting i guess lol but its so hard to find which ive tried changing alot and it does nothing

  7. #7
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926

    Here's a little help

    I didn't look at everything, just the tables and relationships. I attached some recommendations on the table structure to hopefully lead you in the right direction. This was a very quick look though and I didn't look at what the app fully does.
    Attached Files Attached Files
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  8. #8
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    Quote Originally Posted by Nillskill
    Yay! Well it means theres 2 values that are conflicting i guess lol but its so hard to find which ive tried changing alot and it does nothing
    what did you change?

    hint: the error message occurs on a query, and that query is trying to insert or update a new value

    you must know which query gave the error, right?
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  9. #9
    Join Date
    May 2006
    Posts
    8
    Umm nah it just said duplicate in primary key or index value im very confused and thanks so much for the help so far!

  10. #10
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    when did it just say "duplicate in primary key or index value"?

    when you opened the database? when you designed the table? when you saved the query?

    hint: when you ran the query

    what is the query that gave the error?
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  11. #11
    Join Date
    May 2006
    Posts
    8
    Opps, sorry i probly sound a little confusing, the error occured when i choose a product from a dropdown box. It works fine and the other values update but then i click away from it or try to leave the form and the error occurs.. so it must be the product dropdown box that is causing it! but i have no idea why

  12. #12
    Join Date
    May 2006
    Posts
    8
    Can anyone please give me any more clues?? Have you guys checked out the database? i think it must be a huge problem any help is appreciated.. thanks so much

  13. #13
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Actually - it is the code behind your combo. Check your combo event code and you subform recordsource. Think about it and it will fall into place.
    Testimonial:
    pootle flump
    ur codings are working excelent.

  14. #14
    Join Date
    May 2006
    Posts
    8
    Hey!

    Sorry about this, but the code behind the combo box was given to me by a teacher and im not sure exactly what it means and what is wrong with it.. is there any chance you can help me a little further?

    Thanks so much if u can, Craig

  15. #15
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    Quote Originally Posted by Nillskill
    Have you guys checked out the database?
    i got as far as trying to open the mdb, which failed because i don't have the right version of access

    ordinarily, we would ask you to copy/paste the relevant code here instead of making us do the work of digging for it

    but it looks like you've found a patsy, er, i mean, someone willing to do extra yeoman service
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

Posting Permissions

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