Append Query trouble

redwar38

New member
Local time
Today, 15:56
Joined
Apr 25, 2012
Messages
5
I have created a simple database used to track attendance and assigned computers. I have three tables- StudentsT, ComputersT and AttendanceT. I have one form StudentF used to enter basic information on student, including temp attendance. The problem I'm having is that I created an append query used to pull information off the StudentT and place it into the AttendanceT. It is performing that action properly however it is adding too many records with each individual entry. When I try to update one record the query is updating every record stored in the StudentT. Can anyone help me to solve this issue. It appears to be something simple that as a new user I'm overlooking.:confused:
 
Sounds like you are not specifying any criteria in your append query. If you don't have any criteria (the equivalent of the WHERE statement in SQL) then it will do all records. You need to add criteria to specify which Student should be appended.

However, if you are entering information into the Student table, and then taking that information and entering it into the Attendence table (if I understand correctly), then I think you may need to look at your table design. You should only hold the information in one place ideally, otherwise you are duplicating information and your tables are not normalised.
 
A bit ambiguous here; you go from appending AttendanceT to updating StudentsT...

You should use the data displayed in the form controls to APPEND TO AttendanceT.
If allowing the students to freely fill out the fields, build in logic to verify them, either throwing an error or allowing additions before adding the AttendanceT record.
A better approach, if you're keeping a StudentsT table, is to use a list box to help with data integrity and normalization (as mentioned above). Populate the list with student names, and use the selected value to append to AttendanceT. (the result is a single field, you can JOIN the StudentT data in reports). Walk-ins need to be allowed for (an Add Student form, perhaps), if that's what you mentioned.

On the other side, it sounds as if you have an UPDATE with a bad or missing WHERE statement.
 
Last edited:
Thanks for the responses. Addyman, you were correct in that I had no criteria specified. I have cleared up that problem however I am looking at redesigning the entire database. The database that I was using is one that I found online. However, I am not pleased with the design.
 

Users who are viewing this thread

Back
Top Bottom