-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathForm_CheckinResourcesForm.cls
42 lines (39 loc) · 1.71 KB
/
Form_CheckinResourcesForm.cls
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
VERSION 1.0 CLASS
BEGIN
MultiUse = -1 'True
END
Attribute VB_Name = "Form_CheckinResourcesForm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
' TO DO: Figure out what to do about MarkArrival.
Private Sub btnCheckInResources_Click()
Dim strONumbers() As String
Dim strENumbers() As String
Dim strONumberEntry As String
Dim strENumberEntry As String
' If form is blank, display error
If IsNull(Form_CheckinResourcesForm.txtONumberEntry.Value) And IsNull(Form_CheckinResourcesForm.txtENumberEntry.Value) Then
msgNoResource = MsgBox("You did not enter any resources. Keep trying!", vbInformation, "Resource Check-In")
' If form is not blank:
Else
' If Personnel are present
If Not IsNull(Form_CheckinResourcesForm.txtONumberEntry.Value) Then
strONumberEntry = Trim(CStr(Form_CheckinResourcesForm.txtONumberEntry.Value))
strONumbers = Split(strONumberEntry, vbCrLf)
Call CheckIn(strONumbers)
End If
' If Equipment is present
If Not IsNull(Form_CheckinResourcesForm.txtENumberEntry.Value) Then
strENumberEntry = Trim(CStr(Form_CheckinResourcesForm.txtENumberEntry.Value))
strENumbers = Split(strENumberEntry, vbCrLf)
Call CheckIn(, strENumbers)
End If
msgConfirmation = MsgBox("The resources have been checked in to staging.", vbInformation, "Resource Check-in")
'Open StagingAreaMainMenu
DoCmd.OpenForm "StagingAreaMainMenu"
'Close MobilizeForm
DoCmd.Close acForm, "CheckinResourcesForm"
End If
End Sub