All
I’m using Private Sub Form_Current()
It was working quite well until a user suggested an improvement.
When the form opens on a record, if a value is YES and the values in four other fields are not empty then the four fields should be disabled.
If the form opens and the value is yes and any of the four fields are empty then they should all be enabled.
One or the other works quite well but not the pair of them.
It could be a logic break….
My very basic code is as follows:
Private Sub Form_Current()
If q100.value = “YES” AND _
Cmb_A.value <> “” or_
Cmb_B.value <> “” or _
Cmb_C.value <> “” then
Cmb_A.enabled = false
Cmb_B.enabled = false
Cmb_C.enabled = false
elseIf q100.value = “YES” AND _
Cmb_A.value = “” or_
Cmb_B.value = “” or _
Cmb_C.value = “” then
Cmb_A.enabled = true
Cmb_B.enabled = true
Cmb_C.enabled = true
End if
End sub
The q100.value = “yes” is repeated but it is required.
Regards
Chris