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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Prevent user adding record until current record is archived

Status
Not open for further replies.

Moss100

Technical User
Aug 10, 2004
586
GB
Hi there,

I have a two tables called Rooms & Guests

These are linked as one (Rooms) to many (Guests).


ROOMS TABLE GUESTS TABLE
Guests_ID
Rooms_ID >>> Room_ID_Link
Guest_Archived


I would like, as a safeguard some code to prevent the user from adding a new Guest record if there is currently a record associated with the room which is not archived.

I would greatly appreciate some help in forming code for this (my coding skills are very basic).

Many thanks Mark

 
Yes I was thinking of before insert - but how would I check if a record already existed?

Thansk Mark
 
how would I check if a record already existed
Have a look at the DLookUp function

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top