Not that difficult, but will take some coding in a couple of places.
First, you will need a field in your account record that will show whether
the account is open or closed. I would suggest a Yes/No field with a name
like
[ACCOUNT_OPEN] with a default value of Yes. You will also need a text box
on your form bound to [ACCOUNT_OPEN]. For this example, we will call it
txtAcctOpen
Now, in the After Update event of your combo box:
Dim ctl As Control
If .cboStatus = "Account Closed" Then
If MsgBox("Are you sure you wish to Close Account?",vbYesNo) = vbYes
Then
Me.txtAcctOpen = False
For Each ctl in Me
If ctl.Type = acTextBox or ctl.Type = acComboBox Then
ctl.Locked = True
End If
End If
End IF
You will also need code in the Current event of your form to either Lock or
UnLock the controls depending on whether the account is open or closed.
Stevene James said:
I have a form with a drop down list.
If a user selects from the drop down list Account Closed, is it possible
then to display a msg box saying "Are you sure you wish to Close Account?
Closed Accounts cannot be re-activated." and then greying out all fields in
records and disallowing edits.
Cheers