C
celineusa
Hi all,
I am having problems with an append query. Basically, here is how it is
structured:
StudentTbl: StudentID (Primary Key as a long integer autonumber), and
more fields...
ModifiedTbl: StudentID (as a long integer), DateModified (as a
date/time)
So on my Student form, I have a subform that contains the Modified form
that is automatically updated with the current date/time the student
was changed.
When I create a new student on the student form and I use the Save
button I created, it will save the new student info in the student
table and add the date/time it was created/modified in the ModifiedTbl
with an append query.
However, the first time I create a student and I save it, it will tell
me that it will append 1 row to the ModifiedTbl, but then that there is
1 key violation.
Now, if I modify that student and save it again, the append query will
work fine and append the studentID and DateModified to the ModifiedTbl.
When I create a query to verify why it would not work, before I save
the student, the studentID autonumber is empty in the query, but shows
on the form with a number...
Any suggestion why this would not work the first time, but only the
second time?
Thanks so much,
Celine
I am having problems with an append query. Basically, here is how it is
structured:
StudentTbl: StudentID (Primary Key as a long integer autonumber), and
more fields...
ModifiedTbl: StudentID (as a long integer), DateModified (as a
date/time)
So on my Student form, I have a subform that contains the Modified form
that is automatically updated with the current date/time the student
was changed.
When I create a new student on the student form and I use the Save
button I created, it will save the new student info in the student
table and add the date/time it was created/modified in the ModifiedTbl
with an append query.
However, the first time I create a student and I save it, it will tell
me that it will append 1 row to the ModifiedTbl, but then that there is
1 key violation.
Now, if I modify that student and save it again, the append query will
work fine and append the studentID and DateModified to the ModifiedTbl.
When I create a query to verify why it would not work, before I save
the student, the studentID autonumber is empty in the query, but shows
on the form with a number...
Any suggestion why this would not work the first time, but only the
second time?
Thanks so much,
Celine