Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


Prevent Duplicate Child Records?

Prevent Duplicate Child Records?

Prevent Duplicate Child Records?

I have a station ID table connected to another data (species code) table via one to many relationship using the station ID. Users enter species codes for a station using a form. How can I prevent a user from entering duplicate species codes for a particular station ID. In other words its ok to have duplicate species codes in the data table, but not for a particular station ID. Hope this is not confusing. Thanks for any help.

RE: Prevent Duplicate Child Records?

Would "one to one relationship" do the trick?

Have fun.

---- Andy

RE: Prevent Duplicate Child Records?

3 tables.

Station Table
- StationID
- other station data
Species Table
- SpeciesID
- other species data
Station-Species Table
- StationID
- SpeciesID

This allows a species to be recorded at more than one station, but not more than once at each station. The concept is called a relation table, bridge table, and I think there are a few other names.

The reasonable man adapts himself to the world. The unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man. - George Bernard Shaw

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close