conditionally display

P

Patty

My main table contains a field called EntityType as well as EntityAddress.
My form contains general info on top and 5 tabs below. There is 1 tab for
each entity type.

I need to display the address fields on the "CORP" tab if EntityType='CORP'
or on the "INDIV" tab if EntityType='INDIV'. The address fields should only
display on 1 tab.

The best I can do with conditional formatting is have them grayed out. I
would like them to disappear completely.

Can someone point me in the right direction?

Thank you!
PB
 
A

Allen Browne

Several possible approaches.

1. Use different forms for individuals and corporate entities.
Although the data is all in the one table, you could use different forms
that have the fields laid out for that type. Use a query as the source, so
only records of that type are shown in that form.

2. Hide the fields
Use the Current event of the form, and the AfterUpdate event of the
EntityType to set the Visible property of the controls on the form. (This
assumes you have 2 text boxes bound to the Address field - one for corp, and
one for indiv - so you can hide the boxes you don't want to see.)

3. Create an Address tab
Put the address controls in their own tab - a tab that can be visible
regardless of whether the entity type is corp or indiv.
 
Top