avoiding double entry in table

H

hermie

Hi I have a small table that records the absents of students in my school
Field names are: IDabsent, social sucurity, date_absent, reason

How can i avoid that an asbent of a student is entered twice?

Hermie
 
S

Sal Rosario

How would you know if the absence was entered twice? If the social and date
are repeated? If that were the case, you could make the social and the date
combined your primary key field.
 
A

Armen Stein

How would you know if the absence was entered twice? If the social and date
are repeated? If that were the case, you could make the social and the date
combined your primary key field.

Or, you can combine the fields that need to be unique into a Unique
Index. This lets you use an AutoNumber primary key for simplicity, but
still enforce uniqueness on one or more other fields.

--
Armen Stein
Access 2003 VBA Programmer's Reference
http://www.amazon.com/exec/obidos/ASIN/0764559036/jstreettech-20
J Street Technology, Inc.
Armen _@_ JStreetTech _._ com
 

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