AutoNumber Field Not Populating with Append Query

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.
 
J

Jerry Whittle

Yes. Is the DISCIPLINENUMBER field also the primary key? If so, something is
badly wrong.
 
A

AccessIM

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top