Results 1 to 6 of 6
  1. #1
    jwill is offline Advanced Beginner
    Windows Vista Access 2010 64bit
    Join Date
    Mar 2012
    Location
    MD
    Posts
    67

    Uggggghhh! Autonumber not working on insert

    Access 2010


    Split Database


    Trying to insert records but autonumber appears to be blocking my insert. This is the SQL code I'm using

    Code:
    insert into students(last_name, first_name, date_enrolled, sex, dob, stu_address_1, stu_city, stu_state, stu_zip)
    select last_name, first_name, date_enrolled, sex, dob, stu_address_1, stu_city, stu_state, stu_zip
    from student_data_dump;
    I'm getting the error message "Microsoft Access can't append all the records in the append query"

    This is really getting on my nerves. There is no primary key in student_data_dump and the autonumber field is not included in the INSERT INTO statement. What is going on!?!?!?!!? lol thanks in advance
    Attached Thumbnails Attached Thumbnails Untitled.jpg  

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Why do you think it is the AutoNumber? How many records are you trying to append?

  3. #3
    jwill is offline Advanced Beginner
    Windows Vista Access 2010 64bit
    Join Date
    Mar 2012
    Location
    MD
    Posts
    67
    Quote Originally Posted by RuralGuy View Post
    Why do you think it is the AutoNumber? How many records are you trying to append?
    I'm trying to insert 32 records and I've looked over all the data and I can't imagine what else it would be. Maybe I should try removing the constraints from the table script for the primary key and see if that works. I'll let u know

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Are all of the incoming fields strings (text)?

  5. #5
    jwill is offline Advanced Beginner
    Windows Vista Access 2010 64bit
    Join Date
    Mar 2012
    Location
    MD
    Posts
    67
    Text and dates

  6. #6
    ssanfu is offline Master of Nothing
    Windows 2K Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    According to the error message you attached, the query didn't add 32 records due to validation rules.
    What validation rules do you have on the fields in the "students" table??

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

Similar Threads

  1. Working on an SQL Insert / Update combined
    By robsworld78 in forum Programming
    Replies: 0
    Last Post: 02-23-2012, 10:24 PM
  2. Replies: 1
    Last Post: 10-12-2011, 08:07 AM
  3. why isn't this insert into working?
    By token_remedie in forum Queries
    Replies: 3
    Last Post: 09-21-2011, 09:14 PM
  4. Autonumber SQL INSERT INTO
    By eww in forum Programming
    Replies: 16
    Last Post: 03-04-2011, 03:29 PM
  5. Attachment data type INSERT INTO not working
    By LouisLouis in forum Programming
    Replies: 0
    Last Post: 09-27-2009, 02:23 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