-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMainFormCode.bas
More file actions
47 lines (28 loc) · 1004 Bytes
/
MainFormCode.bas
File metadata and controls
47 lines (28 loc) · 1004 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
Attribute VB_Name = "MainFormCode"
Option Compare Database
Public EditStatus As Boolean
Public AllFieldsComplete As Boolean
Sub CheckUserEntry(FormName As String)
Dim ctr As Control
Dim strMsg As String
Dim responseMsgBox
'Loop through every control on the form
For Each ctr In Forms(FormName).Controls
'Look for a Particular Tag
If ctr.Tag = "BlkChk" Then
'Create a List of empty questions
If IsNull(ctr) Then
strMsg = strMsg & "- " & ctr.ControlTipText & vbCrLf
End If
End If
Next ctr
'Did We Find Any Unanswered Questions?
If strMsg <> "" Then
responseMsgBox = MsgBox("The following fields require a response" & vbCrLf & vbCrLf & _
strMsg & vbCrLf & vbCrLf & "Please fill in these fields before submitting", vbOKOnly, "Required data")
If responseMsgBox = vbNo Then Glob_Var.QuitConfirmation
AllFieldsComplete = False
Else
AllFieldsComplete = True
End If
End Sub