Valery
Registered User.
- Local time
- Today, 15:02
- Joined
- Jun 22, 2013
- Messages
- 363
Hi everyone!
I have a continuous subform where users will enter tenant's names along with their Status. The status is selected through a limit-to-list combo box offering a choice of M, O or F.
I need to ensure that ONE of the tenants has the status F and no other tenants have it. Other tenants will have either M or O (as many as they want).
I really would appreciate,
1) an event procedure in the Exit command button located on the main form, that would not allow the user to exit the form if no tenant has a status "F". A message such as "You must have ONE Main Tenant with Status "F" - please update" would popup. The user would not be able to exit the main form until the correction was made.
2) an event procedure to NOT allow them to enter more than one status "F".
Therefore when the user would try to enter another record with a status "F", OR (if it is easier for you) exit the form with more than one status "F" tenant, a warning message would popup: "You already have selected a Main Tenant...". The user would not be able to exit the main form until the correction was made.
As I am a newbie, here is some info:
Name of the main form: frmUnitUpd
Name of the subform: frmUnitUpd_Tenant
Name of the field in the subform: Status - derived from tblTenant
I hope this does not require a module but just some short event procedure. I tried conditional formatting to find out quickly that it is limited to formatting, lol.
Thank you!
I have a continuous subform where users will enter tenant's names along with their Status. The status is selected through a limit-to-list combo box offering a choice of M, O or F.
I need to ensure that ONE of the tenants has the status F and no other tenants have it. Other tenants will have either M or O (as many as they want).
I really would appreciate,
1) an event procedure in the Exit command button located on the main form, that would not allow the user to exit the form if no tenant has a status "F". A message such as "You must have ONE Main Tenant with Status "F" - please update" would popup. The user would not be able to exit the main form until the correction was made.
2) an event procedure to NOT allow them to enter more than one status "F".
Therefore when the user would try to enter another record with a status "F", OR (if it is easier for you) exit the form with more than one status "F" tenant, a warning message would popup: "You already have selected a Main Tenant...". The user would not be able to exit the main form until the correction was made.
As I am a newbie, here is some info:
Name of the main form: frmUnitUpd
Name of the subform: frmUnitUpd_Tenant
Name of the field in the subform: Status - derived from tblTenant
I hope this does not require a module but just some short event procedure. I tried conditional formatting to find out quickly that it is limited to formatting, lol.
Thank you!
Last edited: