MajP
You've got your good things, and you've got mine.
- Local time
- Today, 13:38
- Joined
- May 21, 2018
- Messages
- 8,527
I think you need additional code to unlock the controls once the required fields are entered. That is why I suggest removing the message from the validation function. This why you can call the function on the after update of each required field. I would make the check generic so you can call it from many places such as the on current or the after update of the required controls.
Code:
Private Sub enableDisable()
'ValidationOfControl = True when certain fields are not populated
'When F_Project is opened with this button, these fields should have already been populated.
Dim valid As Boolean
valid = ValidationOfControl(Me)
With Me
.cboProjectFY.Enabled = Not valid
.cboProjectType.Enabled = Not valid
.cboFundingType.Enabled = Not valid
.CheckPSD.Enabled = Not valid
.CheckNEPA.Enabled = Not valid
.CheckActive.Enabled = Not valid
.CheckActiveAwarded.Enabled = Not valid
.CheckActiveContractor.Enabled = Not valid
.CheckCloseOutProject.Enabled = Not valid
.txtEstimate.Enabled = Not valid
.txtProjectPriority.Enabled = Not valid
.txtDateCreated.Enabled = Not valid
.SF_Contract.Enabled = Not valid
.TabCtProjects.Enabled = Not valid
End With
End Sub