View Single Post
  #2  
Old August 12th, 2009, 03:56 AM posted to microsoft.public.access.gettingstarted
Arvin Meyer [MVP][_2_]
external usenet poster
 
Posts: 2,310
Default Prevent duplication of entries from different tables?

If the tables are joined you can run a DLookup, or DCount on the query to
check for the presence of an existing combination. If they aren't joined, I
don't think there's any way to run a query without a Cartesian Product (the
multiplying of 1 set of records by the other)
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com


"Lostguy" wrote in message
...
Hello!

tblEmployee with EmployeeIDpk and FName (holds employee data)
tblEventType with EventTypeIDpk and EventName (holds event data)
tblEmployeeEvent with EmployeeIDfk and EventWhenIDfk (holds which
employees were at which events)
tblEventWhen with EventWhenIDpk, EventTypeIDfk, EventDate,
EventLocation (holds when, where and what type of event happened)

I don't want the same employee to do the same thing twice on the same
day.

So I don't want two Smith-Bowling-19Jan2009 entries.

AFIAK, setting the Indexed property for these two fields will prevent
duplicates within the fields, but isn't where I need to go. And the
Multiple-Field Primary Key method only works within one table.

How do I prevent duplication of the same EmployeeID-EventTypeID combo
when those are in different tables?

VR/

Still Lost