JPaulo
Developer
- Local time
- Today, 22:57
- Joined
- Dec 21, 2009
- Messages
- 185
Hi all;
How to validation null fields in continuous forms, with this code by tag ???
Public Function valNullControl(frm As Form)
Dim ctl As Control
Dim minhaArray As String
Dim validacaoOk As Byte
validacaoOk = 0
For Each ctl In frm.Controls
If ctl.Tag <> Null Or ctl.Tag <> "" Then
ctl.BackColor = 16777215
End If
Next ctl
For Each ctl In frm.Controls
If ctl.Visible = True Then
If ctl.Tag <> Null Or ctl.Tag <> "" Then
If IsNull(ctl) = True Or ctl = "" Then
ctl.BackColor = 161616
validacaoOk = 1
minhaArray = minhaArray & ctl.Tag & ", "
End If
End If
End If
Next ctl
If validacaoOk = 1 Then MsgBox "Required field: " & minhaArray
End Function
it works perfect in simple form.
How to validation null fields in continuous forms, with this code by tag ???
Public Function valNullControl(frm As Form)
Dim ctl As Control
Dim minhaArray As String
Dim validacaoOk As Byte
validacaoOk = 0
For Each ctl In frm.Controls
If ctl.Tag <> Null Or ctl.Tag <> "" Then
ctl.BackColor = 16777215
End If
Next ctl
For Each ctl In frm.Controls
If ctl.Visible = True Then
If ctl.Tag <> Null Or ctl.Tag <> "" Then
If IsNull(ctl) = True Or ctl = "" Then
ctl.BackColor = 161616
validacaoOk = 1
minhaArray = minhaArray & ctl.Tag & ", "
End If
End If
End If
Next ctl
If validacaoOk = 1 Then MsgBox "Required field: " & minhaArray
End Function
it works perfect in simple form.