Hello.
I have combo boxes with several options.
i.e.
FIELD: Entrance Doors Flats
None
Standard Door
Fire Door
Direct Access
If a surveyor selects anything other than "None" they must answer a Quantity and Renew Year txtbox fields.
Is there some code to disable these two txt boxes until they select a type of door. Or keep disabled if they select None?
But also I want an afterform update to validate the code something like below: However it flags up at the minute regardless of the answer.
Code:
Private Sub Form_AfterUpdate()If Not Me.[Entrance Doors - Flats (Fire Doors)] = "None" And Nz(Me.EntranceDoorsFlatsRenewYear], "") = "" Then
MsgBox "If an Entrance Door is Selected a Renew Year Must be Entered!"
[EntranceDoorsFlatsRenewYear].SetFocus
[EntranceDoorsFlatsRenewYear].BackColour = vbRed
Cancel = True
Exit Sub
End If
End Sub
Also in this code if not answered it backcolours red. Once answered can this be returned to white?
Thanks