Dear All,
I have a form where user can select Status, after Status is selected, and if the Progress field is empty I put a msgbox on screen, stating that all the required fields need to be filled in and looped it until field is filled in
(Progress field is not set as required because during regular data uploads this field is empty, so if I set it as required I cant do the data upload)
My problem is that it keeps giving me the msgbox and I have no chance to enter data in the Progress field
Here is the code so far:
Private Sub Status_AfterUpdate()
Dim stMessage As String
If Me.Status <> "Open" And IsNull(Me.Progress) = True Then
Do While IsNull(Me.Progress) = True
stMessage = "Please fill in all the required fields!"
MsgBox stMessage, vbCritical, "Attention!"
Loop
Else
End If
End Sub
Could you please advise on how I can have the possibility to enter data and then recheck the if ?
Many thanks in advance!
I have a form where user can select Status, after Status is selected, and if the Progress field is empty I put a msgbox on screen, stating that all the required fields need to be filled in and looped it until field is filled in
(Progress field is not set as required because during regular data uploads this field is empty, so if I set it as required I cant do the data upload)
My problem is that it keeps giving me the msgbox and I have no chance to enter data in the Progress field
Here is the code so far:
Code:
Dim stMessage As String
If Me.Status <> "Open" And IsNull(Me.Progress) = True Then
Do While IsNull(Me.Progress) = True
stMessage = "Please fill in all the required fields!"
MsgBox stMessage, vbCritical, "Attention!"
Loop
Else
End If
End Sub
Code:
Could you please advise on how I can have the possibility to enter data and then recheck the if ?
Many thanks in advance!