I have a subform in a tab control that has some control validation.
The problem I am having is that it fires on a new record.
How do I fix this?
The validation control module looks for the * tag to check which controls to look at.
Currently only one control has a *. SubmmittalNum.
When I click on the tab control "Submittals" and it is a new record, it fires the validation control and sends me the message shown below.
I don't want to see that message yet, since it is obvious the field hasn't been populated yet.
Here's my code on the tab control. It works fine for records that are populated but not for a new record.
The problem I am having is that it fires on a new record.
How do I fix this?
The validation control module looks for the * tag to check which controls to look at.
Currently only one control has a *. SubmmittalNum.
When I click on the tab control "Submittals" and it is a new record, it fires the validation control and sends me the message shown below.
I don't want to see that message yet, since it is obvious the field hasn't been populated yet.
Here's my code on the tab control. It works fine for records that are populated but not for a new record.
Code:
Private Sub TabCtProjects_Change()
'ValidationOfControl = True when certain fields are not populated
If Forms!F_Project!TabCtProjects.Value = 5 Then
If ValidationOfControl(Forms!F_Project.SubmittalF.Form) = False Then
With Forms!F_Project.SubmittalF.Form
.DateReturned.Enabled = True
.SubmittalNum.Enabled = True
.Subject.Enabled = True
.SpecificationSection.Enabled = True
.NewSubmittal.Enabled = True
.Resubmittal.Enabled = True
.AdditionalInfo.Enabled = True
.ShopDrawing.Enabled = True
.Administrative.Enabled = True
.AsBuilts.Enabled = True
.Sample.Enabled = True
.ProductData.Enabled = True
.OM.Enabled = True
.cmdAddSubmittal.Enabled = True
.cmdPreviousSubmittal.Enabled = True
.cmdNextSubmittal.Enabled = True
.SubmittalItemSF.Enabled = True
.NoException.Enabled = True
.ReviewedasNoted.Enabled = True
.ReviseandResubmit.Enabled = True
.RejectedSubmittal.Enabled = True
.Other.Enabled = True
.CompleteResubmittal.Enabled = True
.AdditionalInfoToReturn.Enabled = True
.SubmittalComments.Enabled = True
.cmdSubmittalTransmittal.Enabled = True
End With
End If
End If
End Sub