View Single Post
  #1  
Old October 24th, 2009, 03:34 AM posted to microsoft.public.access.forms
Nurse Nancy
external usenet poster
 
Posts: 67
Default Form Validation where 1 field depends on another fields value

Hi
I have a form where I have 2 fields
AgencyDirectCB - this has a valuelist with Agency or Direct
AgencyCB - This is a combobox from a query of the Agency Table
DirectContactID - this will contain the Direct ContactID

I would like to do the following...

If the user selects Agency, in the AgencyDirectCB, then they must select an
Agency from AgencyCB (it can not be null) and
The DIrectContactID must be null, or not enabled,,,, (but what if there was
already a contact in there, and user is changing from Direct to Agency, it
would need it to be nulled out)

If the User select Direct, then the AgencyCB must be null and
DirectContactID must not be null

Does anyone know how I would do this,, or have a similar example they could
send me,, thanks so much



--
Nancy