Results 1 to 3 of 3
  1. #1
    VickyC is offline Novice
    Windows XP Access 2010 (version 14.0)
    Join Date
    Sep 2010
    Posts
    2

    overwriting table rows

    NEW USER! - I have a table (tblDateTestScore) with 3 columns: MonthID (date) , TestID (text) , Score (integer). The 1st TWO columns form the primary key. Sample values look like...

    MonthID TestID Score
    Sep, 2010 C6 82
    Sep, 2010 A17 69
    Sep, 2010 G3 75 etc...

    Users enter these values from a form, which are then written into the table.

    Here's my question: If the user now enters Sep, 2010 C6 81, I get a primary key violation. What I'd like is for a message box to warn the user that "A Score already exists for Sep, 2010 C6. Do you wish to replace this Score?"

    I need help with how this can be coded.

    much thanks


    VickyC

  2. #2
    weekend00 is offline I may not be right
    Windows XP Access 2003
    Join Date
    Aug 2010
    Posts
    1,295
    check them in after_update events of both monthID and testID.

  3. #3
    VickyC is offline Novice
    Windows XP Access 2010 (version 14.0)
    Join Date
    Sep 2010
    Posts
    2

    Overwrite row - still stuck

    Thanks Weekend00 - but that's where I'm having trouble writing the code. (how to check, and then a) write new entry if the PK doesn't already exist, or b) give the user the option to either bale or to overwrite the row if the PK already does exist.)

    I'm very new to this, so I need it 'spelled out' a bit

    much thanks
    VickyC

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 08-17-2010, 02:49 PM
  2. "Internal" timestamp on table rows?
    By quahtrader in forum Access
    Replies: 1
    Last Post: 07-13-2010, 10:43 AM
  3. Matching Rows in Table (kinda desperate)!
    By UCBFireCenter in forum Queries
    Replies: 0
    Last Post: 10-15-2009, 04:21 PM
  4. Replies: 1
    Last Post: 06-01-2009, 01:09 PM
  5. Replies: 0
    Last Post: 08-25-2008, 12:17 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums