Results 1 to 13 of 13
  1. #1
    Join Date
    Jan 2009
    Posts
    3

    Unanswered: Please help! Need this done for coursework!

    Hey guys,

    I'm pretty new to access and i need some help!

    I have a table for bookings.

    I need to make sure that the Court, Date, and Time fields are only allowed one combination of the three once.

    E.g.

    Record 1

    Court - 1
    Date - 1/3/2009
    Time - 6:00


    Record 2

    Court - 2
    Date - 6/2/2009
    Time - 12:00


    That can be allowed but this can't:

    Court - 1
    Date - 1/3/2009
    Time - 6:00


    Record 2

    Court - 1
    Date - 1/3/2009
    Time - 6:00


    Can anyone help?

    Thanks Chris

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    have you considered using a PK?
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    Jan 2009
    Posts
    3
    PK?

    Thanks
    Chris

  4. #4
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    PK = primary key

    make the three columns your primary key

    in Table Design, highlight the three columns and click the little golden key

    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  5. #5
    Join Date
    Jan 2009
    Posts
    3
    Ohhhh

    Ok

    Thanks =]

  6. #6
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    I don't understand why students don't just ask their lecturer. Are lecturers retarded these days or something?
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  7. #7
    Join Date
    Jan 2009
    Posts
    9
    I asked mine, he didnt know how to fix my problem @(*.*)@

  8. #8
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Your lecturer doesn't know what a primary key constraint is? What are they lecturering in exaclty?!
    George
    Home | Blog

  9. #9
    Join Date
    Sep 2008
    Location
    NM, USA
    Posts
    97
    Quote Originally Posted by georgev
    Your lecturer doesn't know what a primary key constraint is? What are they lecturering in exaclty?!
    I was gonna say, that is pretty... um..what iz word... unbelievable.
    "Unix is user friendly... It's just very picky about its friends."

    The best things in life...are well-documented.

  10. #10
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    If the lecturer doesn't know how to fix the problem then the lecturer should not be lecturing the subject.

    Seems it is as I thought. Lecturers are now basically uneducated and the only answers they have are in their "teacher's book". This dumbing down seems to be happening EVERYWHERE I look tbh, but the last place I thought it would occur is in schooling...
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  11. #11
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    I hired a guy fresh out of college. They taught him the recursive structure (1 table that hold numbers which represents more number until finally (buried), you could actully get to see the data. It was disasterous putting this data back into a normal relational diagram. He said his professor said it was the latest database structuring techniques which improve upon the typical relational structures.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  12. #12
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    Obviously his professor has never actually worked with such designs IRL.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  13. #13
    Join Date
    Dec 2003
    Location
    Dallas, TX
    Posts
    1,004

    Talking

    Quote Originally Posted by StarTrekker
    I don't understand why students don't just ask their lecturer. Are lecturers retarded these days or something?
    Nope, they just don't ask them because they don't want the lecturer to know that they really don't understand the problem at all. Then can come here or wherever for help, take it back and look like pro's. Only once they get in the real world and on a job, they won't know a thing. You're FIRED....hehehe.

    Bud

Posting Permissions

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