Require a particular record

ST4RCUTTER

Registered User.
Local time
Today, 07:08
Joined
Aug 31, 2006
Messages
94
I have a table that contains all the contacts for a project. This table consists of 5 fields.

| ContactID | ContactType | First Name | Last Name | Workorder# |.

There is one particular record that must be created for each work order before it can be saved. That is a record where ContactType = "Project Manager". Is there a way that I can check to see if a contact has been created before saving the record? If it doesn't exist, I want Access to prompt the user that a Project Manager must be assigned before you can save the record.

Thanks!
 
Do you mean there must be a project manager for each workorder?
 
Correct.

If someone creates a record without a project manager value then it screws up lookups on that record in the future. A PM contact is always assigned and should always be present on a workorder.

I can require that a record exists that matches the workorder table...this can be done on the table that houses the stored contacts (tbl_contacts) but that only enforces that any record exists. I need a record with a value of "Project Manager" in the ContactType field.
 
check out the dlookup function, it should do the trick
 

Users who are viewing this thread

Back
Top Bottom