AutoNumber Field Not Populating with Append Query

  • Thread starter Thread starter AccessIM
  • Start date Start date
A

AccessIM

Hello -

I have the following append query:

INSERT INTO tblDiscipline ( DISCIPLINEDATE, EMPLOYEEID, SSN, NAME,
DATEOFINCIDENTCAUSINGDISCIPLINE, TYPEOFINCIDENTCAUSINGDISCPLINE, TOTALPOINTS,
INITIALDISCIPLINE, DISCIPLINELEVEL, DISCIPLINE, FROZEN )
SELECT qryDiscipline7.DATE, qryDiscipline7.EMPLOYEEID, qryDiscipline7.SSN,
qryDiscipline7.NAME, qryDiscipline7.DATEOFINCIDENTCAUSINGDISCIPLINE,
qryDiscipline7.TOTALPOINTS, qryDiscipline7.INITIALDISCIPLINE,
tblDisciplineLevels.DISCIPLINELEVEL, qryDiscipline7.DISCIPLINE,
qryDiscipline7.FROZEN FROM (qryDiscipline7 INNER JOIN qryDisciplineMax ON
qryDiscipline7.SSN = qryDisciplineMax.SSN) INNER JOIN tblDisciplineLevels ON
qryDiscipline7.DISCIPLINE = tblDisciplineLevels.DISCIPLINE;

In the table that the query is appending to there is a field called
DISICPLINENUMBER that is an autoNumber field.

When I run the append query, the DISCIPLINENUMBER field is left blank.
Shouldn't this fill in when the new records are appended?

Thank you very much.
 
Yes. Is the DISCIPLINENUMBER field also the primary key? If so, something is
badly wrong.
 
Oh my gosh! I didn't have that field set as the primary key! I should have
noticed that. Thank you so much for pointing that out.
 
Back
Top