Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

No duplicates in a subform

Status
Not open for further replies.

kev747

Technical User
Jan 30, 2003
68
0
0
AU
Hey all,
In Access '97, I've created a form with a sub form contained within, and they have a one to many relationship.

The subform records staff names, the main form records observations.

How can I limit the subform to contain no duplicate staff names for the linked record in the main form?

In other words, the same staff member cannot appear more than once in the subform for a given record on the main form, but can appear in the subform for multiple records in the main form?

Does that make sense?

Thanks for any advice/help offered. I have searched the FAQ but had no luck.

Kev.
************



This is a politically correct signature, due to constant whinging about my previous signature.
Long live the fun police.
 
I believe your problem begins with table design. If you assign an unique ID number to each record displayed on your main form you can then construct a query as a data source for the subform. Set that query to contain the ID number and set the query property Unique Values to On. That should do it.

AvGuy
 
Thanks AvGuy.
I've been playing around with it and came up with a similar solution.

Hope it continues to work.

Cheers.

Kev.


This is a politically correct signature, due to constant whinging about my previous signature.
Long live the fun police.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top