0% found this document useful (0 votes)
70 views33 pages

Properties: L:/Blackberry/Documents/Dell/Sat - Datapack/Datapack - R2.Mdb Monday, July 19, 2010 Module: Basdecvars

This document contains code from multiple modules in a Microsoft Access database. The modules define global variables, functions for creating forms, checking if forms and files exist, and retrieving parts of file paths and network adapter details. The code was created between February and July 2006 and stores information like user names, passwords, and computer network configuration to be shared across the database application.

Uploaded by

griffith2010
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
70 views33 pages

Properties: L:/Blackberry/Documents/Dell/Sat - Datapack/Datapack - R2.Mdb Monday, July 19, 2010 Module: Basdecvars

This document contains code from multiple modules in a Microsoft Access database. The modules define global variables, functions for creating forms, checking if forms and files exist, and retrieving parts of file paths and network adapter details. The code was created between February and July 2006 and stores information like user names, passwords, and computer network configuration to be shared across the database application.

Uploaded by

griffith2010
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
You are on page 1/ 33

L:\BlackBerry\documents\dell\SAT_DATAPACK\DATAPACK_R2.

mdb Monday, July 19, 2010


Module: basDecVars Page: 1

Properties
Container: Modules DateCreated: 7/7/2006 12:58:27 PM
LastUpdated: 7/7/2006 12:58:27 PM Owner: admin
UserName: admin

Code
1 Attribute VB_Name = "basDecVars"
2 Option Compare Database
3 Option Explicit
4
5 Global gintPasswordFlag As Integer
6 Global gOkToClose As Integer
7
8
L:\BlackBerry\documents\dell\SAT_DATAPACK\DATAPACK_R2.mdb Monday, July 19, 2010
Module: basGetUserName Page: 2

Properties
Container: Modules DateCreated: 7/7/2006 12:58:27 PM
Description: This module is used to LastUpdated: 7/7/2006 12:58:28 PM
retrieve the network user
name by accessing the API
apiGetUserName
Owner: admin UserName: admin

Code
1 Attribute VB_Name = "basGetUserName"
2 Option Compare Database
3 Option Explicit
4
5 Private Declare Function apiGetUserName Lib "advapi32.dll" Alias "GetUserNameA" (ByVal
lpBuffer As String, nSize As Long) As Long
6 '----------------------------------------------------------------------------------------------------------------

7 ' This code is used to retrieve the network user name by accessing the API apiGetUserName.
8 ' Created by: Unknown (Found on Dev Ashish web site http://home.att.net/~dashish/api)
9 ' This code has not been altered in anyway.
10 ' Added to database: 19 Feb 2002
11 ' Added by: Griffith Morrison
12 '---------------------------------------------------------------------------------------------------------------

13
14 Function fOSUserName() As String
15 On Error GoTo fOSUserName_Err
16
17 Dim lngLen As Long, lngX As Long
18 Dim strUserName As String
19
20 strUserName = String$(254, 0)
21 lngLen = 255
22 lngX = apiGetUserName(strUserName, lngLen)
23
24 If lngX <> 0 Then
25 fOSUserName = Left$(strUserName, lngLen - 1)
26 Else
27 fOSUserName = ""
28 End If
29
30
31 fOSUserName_Exit:
32 Exit Function
33
34 fOSUserName_Err:
35 MsgBox Error$
36 Resume fOSUserName_Exit
37 End Function
L:\BlackBerry\documents\dell\SAT_DATAPACK\DATAPACK_R2.mdb Monday, July 19, 2010
Module: basGlobal Page: 3

Properties
Container: Modules DateCreated: 7/7/2006 12:58:27 PM
LastUpdated: 7/7/2006 12:58:27 PM Owner: admin
UserName: admin

Code
1 Attribute VB_Name = "basGlobal"
2 Option Compare Database
3 Option Explicit
4
5 Function CreateNewForm(strName As String, _
6 Optional strDB As String = "") As Form
7 On Error Resume Next
8
9 Dim frm As Form
10 Dim strFrmName As String
11
12 ' Create new form
13 Set frm = CreateForm
14
15 ' Set form properties
16 With frm
17 '.Name = strName
18 .Caption = strName
19 .ScrollBars = False
20 .NavigationButtons = False
21 .RecordSelectors = False
22 .AutoResize = True
23 .DividingLines = False
24 .PopUp = True
25 End With
26
27 ' Restore form
28 DoCmd.Restore
29
30 strFrmName = frm.Name
31 DoCmd.SetWarnings False
32 DoCmd.close acForm, strFrmName, acSaveYes
33 DoCmd.Rename strName, acForm, strFrmName
34 DoCmd.OpenForm strName, acDesign, , , , acHidden
35 DoCmd.SetWarnings True
36
37 Set CreateNewForm = Forms.Item(strName)
38
39 End Function
40
41 Public Function FormExists(strName As String) As Boolean
42 On Error Resume Next
43
44 Dim db As Database
L:\BlackBerry\documents\dell\SAT_DATAPACK\DATAPACK_R2.mdb Monday, July 19, 2010
Module: basGlobal Page: 4

45 Dim strFName As String


46 Dim intCounter As Integer
47 Dim bExists As Boolean
48
49 bExists = False
50
51 Set db = currentdb
52 For intCounter = 0 To db.Containers("Forms").Documents.Count - 1
53 strFName = db.Containers("Forms").Documents(intCounter).Name
54 If UCase(strName) = UCase(strFName) Then
55 bExists = True
56 Exit For
57 End If
58 Next intCounter
59
60 FormExists = bExists
61
62 End Function
63
64 Function FileExists(strDest As String) As Boolean
65 ' Comments : Determines if the named file exists
66 ' Parameters: strDest - file to check
67 ' Returns : True-file exists, false otherwise
68 '
69 Dim intLen As Integer
70
71 On Error Resume Next
72 intLen = Len(Dir(strDest))
73
74 FileExists = (Not Err And intLen > 0)
75
76 End Function
77
78
79 Public Function GetPathPart(strPath As String) As String
80 ' Comments : Returns the path part of a string
81 ' Parameters: strPath - string to parse
82 ' Returns : path part
83 '
84 Dim lngCounter As Long
85
86 For lngCounter = Len(strPath) To 1 Step -1
87 If MID(strPath, lngCounter, 1) = "\" Then
88 Exit For
89 End If
90 Next lngCounter
91
92 GetPathPart = Left(strPath, lngCounter)
93
94 End Function
95
L:\BlackBerry\documents\dell\SAT_DATAPACK\DATAPACK_R2.mdb Monday, July 19, 2010
Module: basNic Page: 5

Properties
Container: Modules DateCreated: 7/7/2006 12:58:27 PM
LastUpdated: 7/7/2006 12:58:27 PM Owner: admin
UserName: admin

Code
1 Attribute VB_Name = "basNic"
2 Option Compare Database
3 Option Explicit
4
5
6 Public Function GetInfo()
7 Dim Manufacturer As String
8 Dim ProductName As String
9 Dim MACAddress As String
10
11 On Error Resume Next
12 ' To use a computer on a network use the full path otherwise "." referas to the
13 'local computer.
14
15 'strComputer = "."
16
17 'Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
18
19 'Set colItems = objWMIService.ExecQuery("Select * from Win32_NetworkAdapter", , 48)
20
21 'For Each objItem In colItems
22
23
24 ' If objItem.NetConnectionID = objItem.NetConnectionID Then
25
26
27 ' Manufacturer = objItem.Manufacturer
28
29 ' ProductName = objItem.ProductName
30
31 ' MACAddress = objItem.MACAddress
32
33 ' Call MsgBox(Manufacturer, vbInformation, "Mac Address Demo")
34 ' Call MsgBox(ProductName, vbInformation, "Mac Address Demo")
35 ' Call MsgBox(MACAddress, vbInformation, "Mac Address Demo")
36
37
38
39 ' End If
40 'Next
41
42 End Function
L:\BlackBerry\documents\dell\SAT_DATAPACK\DATAPACK_R2.mdb Monday, July 19, 2010
Module: basUserInfo Page: 6

Properties
Container: Modules DateCreated: 7/7/2006 12:58:27 PM
Description: This Module is used assign LastUpdated: 7/7/2006 12:58:28 PM
variables to the user
information and hold it in
memory so that it can be
used as the user navigates
through the database
Owner: admin UserName: admin

Code
1 Attribute VB_Name = "basUserInfo"
2 Option Compare Database
3 Option Explicit
4 '--------------------------------------------------------------------------------------------------
5 ' This code is used assign variables to the user information and hold it in memory
6 ' so that it can be used as the user navigates through the database
7 ' Created By: griffith morrison
8 ' Created On: 19 Feb 2006
9 ' Modified On: 19 Feb 2006
10 '---------------------------------------------------------------------------------------------------
11
12 Public Type UserInfo
13 ViewID As Integer
14 AccessID As Integer
15 Active As Boolean
16 Password As String
17 UserID As String
18 SecurityID As String
19 End Type
20
21 Public User As UserInfo
22
23
L:\BlackBerry\documents\dell\SAT_DATAPACK\DATAPACK_R2.mdb Monday, July 19, 2010
Module: basUtilityFunctions Page: 7

Properties
Container: Modules DateCreated: 7/7/2006 12:58:27 PM
Description: Provides various utilities to LastUpdated: 7/7/2006 12:58:28 PM
secure the database
Owner: admin UserName: admin

Code
1 Attribute VB_Name = "basUtilityFunctions"
2 Option Compare Database
3 Option Explicit
4
5 Public pboolCloseAccess As Boolean 'This code is used to disable the x button in the Access Window

6
7 Function IsLoaded(ByVal strFormName As String) As Boolean
8 '---------------------------------------------------------------------------------------------------------
9 'This code is used to find what form is loaded. It comes from the Microsofts Northwinds
10 'database.
11 'Date created: Unknown
12 'Date Added: 18 Nov 2000
13 'Added by: Griffith Morrison
14 '---------------------------------------------------------------------------------------------------------
15
16 Const conObjStateClosed = 0
17 Const conDesignView = 0
18
19 If SysCmd(acSysCmdGetObjectState, acForm, strFormName) <> conObjStateClosed Then
20 If Forms(strFormName).CurrentView <> conDesignView Then
21 IsLoaded = True
22 End If
23 End If
24
25 End Function
26
27
28 '--------------------------------------------------------------------------------------
29 ' This coode is used to change a database property and is currently called to change the
30 ' shiftkey AllowBypass state.
31 ' Written by: Griffith Morrison
32 ' Created On: 21 Aug 2000
33 ' Modified On: 21 Aug 2000
34 '--------------------------------------------------------------------------------------
35 Function ChangeProperty(strPropName As String, varPropType As Variant, varPropValue As
Variant) As Integer
36 Dim dbs As Database, prp As Property
37 Const conPropNotFoundError = 3270
38
39 Set dbs = currentdb
40 On Error GoTo Change_Err
41 dbs.Properties(strPropName) = varPropValue
L:\BlackBerry\documents\dell\SAT_DATAPACK\DATAPACK_R2.mdb Monday, July 19, 2010
Module: basUtilityFunctions Page: 8

42 ChangeProperty = False
43
44 Change_Bye:
45 Exit Function
46
47 Change_Err:
48 If Err = conPropNotFoundError Then ' Property not found.
49 Set prp = dbs.CreateProperty(strPropName, varPropType, varPropValue)
50 dbs.Properties.Append prp
51 Resume Next
52 Else
53 ' Unknown error.
54 ChangeProperty = False
55 Resume Change_Bye
56 End If
57 End Function
58
59
L:\BlackBerry\documents\dell\SAT_DATAPACK\DATAPACK_R2.mdb Monday, July 19, 2010
Module: CloseCommand Page: 9

Properties
Container: Modules DateCreated: 8/5/2006 12:50:15 PM
LastUpdated: 8/5/2006 12:50:15 PM Owner: admin
UserName: admin

Code
1 VERSION 1.0 CLASS
2 BEGIN
3 MultiUse = -1 'True
4 END
5 Attribute VB_Name = "CloseCommand"
6 Attribute VB_GlobalNameSpace = False
7 Attribute VB_Creatable = False
8 Attribute VB_PredeclaredId = False
9 Attribute VB_Exposed = False
10 Option Compare Database
11 Option Explicit
12
13
14
15 Private Declare Function GetSystemMenu Lib "user32" (ByVal hWnd As Long, _
16 ByVal bRevert As Long) As Long
17
18 Private Declare Function EnableMenuItem Lib "user32" (ByVal hMenu As _
19 Long, ByVal wIDEnableItem As Long, ByVal wEnable As Long) As Long
20
21 Private Declare Function GetMenuItemInfo Lib "user32" Alias _
22 "GetMenuItemInfoA" (ByVal hMenu As Long, ByVal un As Long, ByVal b As _
23 Long, lpMenuItemInfo As MENUITEMINFO) As Long
24
25
26 Private Type MENUITEMINFO
27 cbSize As Long
28 fMask As Long
29 fType As Long
30 fState As Long
31 wID As Long
32 hSubMenu As Long
33 hbmpChecked As Long
34 hbmpUnchecked As Long
35 dwItemData As Long
36 dwTypeData As String
37 cch As Long
38 End Type
39
40 Const MF_GRAYED = &H1&
41 Const MF_BYCOMMAND = &H0&
42 Const SC_CLOSE = &HF060&
43 Public Property Get Enabled() As Boolean
44 Dim hWnd As Long
L:\BlackBerry\documents\dell\SAT_DATAPACK\DATAPACK_R2.mdb Monday, July 19, 2010
Module: CloseCommand Page: 10

45 Dim hMenu As Long


46 Dim result As Long
47 Dim MI As MENUITEMINFO
48
49 MI.cbSize = Len(MI)
50 MI.dwTypeData = String(80, 0)
51 MI.cch = Len(MI.dwTypeData)
52 MI.fMask = MF_GRAYED
53 MI.wID = SC_CLOSE
54 hWnd = Application.hWndAccessApp
55 hMenu = GetSystemMenu(hWnd, 0)
56 result = GetMenuItemInfo(hMenu, MI.wID, 0, MI)
57 Enabled = (MI.fState And MF_GRAYED) = 0
58 End Property
59
60 Public Property Let Enabled(boolClose As Boolean)
61 Dim hWnd As Long
62 Dim wFlags As Long
63 Dim hMenu As Long
64 Dim result As Long
65
66 hWnd = Application.hWndAccessApp
67 hMenu = GetSystemMenu(hWnd, 0)
68 If Not boolClose Then
69 wFlags = MF_BYCOMMAND Or MF_GRAYED
70 Else
71 wFlags = MF_BYCOMMAND And Not MF_GRAYED
72 End If
73 result = EnableMenuItem(hMenu, SC_CLOSE, wFlags)
74 End Property
75
76
L:\BlackBerry\documents\dell\SAT_DATAPACK\DATAPACK_R2.mdb Monday, July 19, 2010
Module: Converted Macro- AutoExec Page: 11

Properties
Container: Modules DateCreated: 8/5/2006 12:50:15 PM
LastUpdated: 8/5/2006 12:50:15 PM Owner: admin
UserName: admin

Code
1 Attribute VB_Name = "Converted Macro- AutoExec"
2 Option Compare Database
3 Option Explicit
4
5
6 '------------------------------------------------------------
7 ' AutoExec_Waiting
8 '
9 '------------------------------------------------------------
10 Function AutoExec_Waiting()
11 On Error GoTo AutoExec_Waiting_Err
12
13 DoCmd.OpenForm "Please signal", acNormal, "", "", acReadOnly, acNormal
14 DoCmd.Hourglass True
15 DoCmd.RepaintObject acForm, "Please signal"
16 DoCmd.OpenForm "OMainMenu", acNormal, "", "", , acNormal
17 DoCmd.close acForm, "Please signal"
18 DoCmd.CancelEvent
19
20
21 AutoExec_Waiting_Exit:
22 Exit Function
23
24 AutoExec_Waiting_Err:
25 MsgBox Error$
26 Resume AutoExec_Waiting_Exit
27
28 End Function
L:\BlackBerry\documents\dell\SAT_DATAPACK\DATAPACK_R2.mdb Monday, July 19, 2010
Module: Converted Macro- CUST2MANY Page: 12

Properties
Container: Modules DateCreated: 2/16/2009 10:57:19 PM
LastUpdated: 2/16/2009 10:57:19 PM Owner: admin
UserName: admin

Code
1 Attribute VB_Name = "Converted Macro- CUST2MANY"
2 Option Compare Database
3 Option Explicit
4
5
6 '------------------------------------------------------------
7 ' CUST2MANY
8 '
9 '------------------------------------------------------------
10 Function CUST2MANY()
11 On Error GoTo CUST2MANY_Err
12
13 DoCmd.OpenQuery "APPEND_TAMT_AS_DEBIT_CUSTTOMANY", acViewNormal, acEdit
14 DoCmd.OpenQuery "APPEND_TAMT_AS_CREDIT_GLTOMANY", acViewNormal, acEdit
15 DoCmd.OpenQuery "APPEND_AMT_AS_DEBIT_CUSTTOMANY", acViewNormal, acEdit
16 DoCmd.OpenQuery "APPEND_CUST_CREDITS_CUST2MANY", acViewNormal, acEdit
17 DoCmd.OpenQuery "DELETEFROMCUSTTOMANYACCTS", acViewNormal, acEdit
18 DoCmd.OpenQuery "DELETEFROMMANYACCTS", acViewNormal, acEdit
19 DoCmd.close acForm, "CUSTTOMANY"
20 DoCmd.OpenForm "CUSTTOMANY", acNormal, "", "", , acNormal
21 MsgBox "Transaction Was Successully Saved", vbInformation, "DATAPACK Release 0.2"
22
23
24 CUST2MANY_Exit:
25 Exit Function
26
27 CUST2MANY_Err:
28 MsgBox Error$
29 Resume CUST2MANY_Exit
30
31 End Function
L:\BlackBerry\documents\dell\SAT_DATAPACK\DATAPACK_R2.mdb Monday, July 19, 2010
Module: Converted Macro- CUST2MANY1 Page: 13

Properties
Container: Modules DateCreated: 2/16/2009 11:01:30 PM
LastUpdated: 2/16/2009 11:01:30 PM Owner: admin
UserName: admin

Code
1 Attribute VB_Name = "Converted Macro- CUST2MANY1"
2 Option Compare Database
3
4 '------------------------------------------------------------
5 ' CUST2MANY1
6 '
7 '------------------------------------------------------------
8 Function CUST2MANY1()
9 On Error GoTo CUST2MANY1_Err
10
11 DoCmd.OpenQuery "APPEND_TAMT_AS_DEBIT_CUSTTOMANY", acViewNormal, acEdit
12 DoCmd.OpenQuery "APPEND_TAMT_AS_CREDIT_GLTOMANY", acViewNormal, acEdit
13 DoCmd.OpenQuery "APPEND_AMT_AS_DEBIT_CUSTTOMANY", acViewNormal, acEdit
14 DoCmd.OpenQuery "APPEND_CUST_CREDITS_CUST2MANY", acViewNormal, acEdit
15 DoCmd.OpenQuery "DELETEFROMCUSTTOMANYACCTS", acViewNormal, acEdit
16 DoCmd.OpenQuery "DELETEFROMMANYACCTS", acViewNormal, acEdit
17 DoCmd.close acForm, "CUSTTOMANY"
18 MsgBox "Transaction Was Successully Saved", vbInformation, "DATAPACK Release 0.2"
19
20
21 CUST2MANY1_Exit:
22 Exit Function
23
24 CUST2MANY1_Err:
25 MsgBox Error$
26 Resume CUST2MANY1_Exit
27
28 End Function
L:\BlackBerry\documents\dell\SAT_DATAPACK\DATAPACK_R2.mdb Monday, July 19, 2010
Module: Converted Macro- CUSTOMER2CUSTOMER Page: 14

Properties
Container: Modules DateCreated: 2/21/2009 1:52:07 AM
LastUpdated: 2/21/2009 1:52:07 AM Owner: admin
UserName: admin

Code
1 Attribute VB_Name = "Converted Macro- CUSTOMER2CUSTOMER"
2 Option Compare Database
3
4 '------------------------------------------------------------
5 ' CUSTOMER2CUSTOMER
6 '
7 '------------------------------------------------------------
8 Function CUSTOMER2CUSTOMER()
9 On Error GoTo CUSTOMER2CUSTOMER_Err
10
11 ' APPENDTO SAVINGSTEMP2 FOR FINAL APPENDING
12 DoCmd.OpenQuery "APPENDTOSAVINGSTEMP_C2C", acViewNormal, acEdit
13 ' DELETE TEMPSAVINGS2
14 DoCmd.OpenQuery "DELETEFROMTEMPSAVINGS2", acViewNormal, acEdit
15 ' APPENDS TO SAVINGS RECORDS
16 DoCmd.OpenQuery "APPENDTOSAVINGS2", acViewNormal, acEdit
17 ' APPEND FROM TEMPSAVINS
18 DoCmd.OpenQuery "APPENDTOSAVINGS1", acViewNormal, acEdit
19 ' APPENDS TO FIRST DEBIT ACCNO IN INTERNAL REPORT
20 DoCmd.OpenQuery "APPENDFROMSAVTOFIRSTINTREP_C2C", acViewNormal, acEdit
21 ' APPENDS TO SECOND CREDIT ACCNO IN INTERNAL REPORT
22 DoCmd.OpenQuery "APPENDFROMSAVTOSECONDINTREP_C2C", acViewNormal, acEdit
23 ' DELETES FROM TEMPSAVINGS
24 DoCmd.OpenQuery "DELETEFROMSAVINGSTEMP2", acViewNormal, acEdit
25 ' UPDATE NULL GLCREDIT AND PRODUCT ATTRIBUTES
26 DoCmd.OpenQuery "UPDATENULLCOL_ON_FRST_CR", acViewNormal, acEdit
27 ' UPDATE NULL GLDEBIT
28 DoCmd.OpenQuery "UPDATENULLCOL_ON_second", acViewNormal, acEdit
29 DoCmd.OpenQuery "UPDATE_ON_FRST_GLCREDIT", acViewNormal, acEdit
30 DoCmd.RunMacro "UPDATECHARTBALNCE", , ""
31 DoCmd.RunMacro "UPDATINGCUSTBALANCES", , ""
32 DoCmd.OpenQuery "UPDATENULLCOL_ON_NEW_ACCT_INTREP", acViewNormal, acEdit
33 DoCmd.OpenQuery "SETOPENBALZERO", acViewNormal, acEdit
34 ' SETS OPEN BAL TO ZERO FOR NULL VALUES IN INTERNAL REPORTS
35 DoCmd.OpenQuery "SETINTERNALOPENBALZERO", acViewNormal, acEdit
36 MsgBox "Transaction was successfully Saved. Thank You.", vbInformation, "DATAPACK
Release 0.2"
37
38
39 CUSTOMER2CUSTOMER_Exit:
40 Exit Function
41
42 CUSTOMER2CUSTOMER_Err:
43 MsgBox Error$
L:\BlackBerry\documents\dell\SAT_DATAPACK\DATAPACK_R2.mdb Monday, July 19, 2010
Module: Converted Macro- CUSTOMER2CUSTOMER Page: 15

44 Resume CUSTOMER2CUSTOMER_Exit
45
46 End Function
L:\BlackBerry\documents\dell\SAT_DATAPACK\DATAPACK_R2.mdb Monday, July 19, 2010
Module: Converted Macro- DEACTIVATION_OF_ACCTS Page: 16

Properties
Container: Modules DateCreated: 3/22/2009 12:58:57 PM
LastUpdated: 3/22/2009 12:58:57 PM Owner: admin
UserName: admin

Code
1 Attribute VB_Name = "Converted Macro- DEACTIVATION_OF_ACCTS"
2 Option Compare Database
3
4 '------------------------------------------------------------
5 ' DEACTIVATION_OF_ACCTS
6 '
7 '------------------------------------------------------------
8 Function DEACTIVATION_OF_ACCTS()
9 On Error GoTo DEACTIVATION_OF_ACCTS_Err
10
11 DoCmd.OpenQuery "UPDATE_ACCT_DEACTIVATION", acViewNormal, acEdit
12 Beep
13 MsgBox "Account Has Been Successfully Deactivated.", vbInformation, "DATAPACK Release
0.2_XX5"
14
15
16 DEACTIVATION_OF_ACCTS_Exit:
17 Exit Function
18
19 DEACTIVATION_OF_ACCTS_Err:
20 MsgBox Error$
21 Resume DEACTIVATION_OF_ACCTS_Exit
22
23 End Function
L:\BlackBerry\documents\dell\SAT_DATAPACK\DATAPACK_R2.mdb Monday, July 19, 2010
Module: Converted Macro- GLTOMANY Page: 17

Properties
Container: Modules DateCreated: 2/16/2009 10:17:50 PM
LastUpdated: 2/16/2009 10:17:50 PM Owner: admin
UserName: admin

Code
1 Attribute VB_Name = "Converted Macro- GLTOMANY"
2 Option Compare Database
3 Option Explicit
4
5
6 '------------------------------------------------------------
7 ' GLTOMANY
8 '
9 '------------------------------------------------------------
10 Function GLTOMANY()
11 On Error GoTo GLTOMANY_Err
12
13 DoCmd.OpenQuery "APPEND_TAMT_AS_CREDIT_GLTOMANY", acViewNormal, acEdit
14 DoCmd.OpenQuery "APPEND_TAMT_AS_DEBIT_GLTOMANY", acViewNormal, acEdit
15 DoCmd.OpenQuery "APPEND_CUST_CREDITS_GLMANY", acViewNormal, acEdit
16 DoCmd.OpenQuery "DELETEFROMMANYACCTS", acViewNormal, acEdit
17 DoCmd.OpenQuery "DELETGLTOMANY", acViewNormal, acEdit
18 DoCmd.close acForm, "GLTOMANY"
19 MsgBox "Transaction was successfully saved.", vbInformation, "DATAPACK Release 0.2"
20
21
22 GLTOMANY_Exit:
23 Exit Function
24
25 GLTOMANY_Err:
26 MsgBox Error$
27 Resume GLTOMANY_Exit
28
29 End Function
L:\BlackBerry\documents\dell\SAT_DATAPACK\DATAPACK_R2.mdb Monday, July 19, 2010
Module: Converted Macro- GLTOMANY1 Page: 18

Properties
Container: Modules DateCreated: 2/16/2009 10:22:20 PM
LastUpdated: 2/16/2009 10:22:20 PM Owner: admin
UserName: admin

Code
1 Attribute VB_Name = "Converted Macro- GLTOMANY1"
2 Option Compare Database
3 Option Explicit
4
5
6 '------------------------------------------------------------
7 ' GLTOMANY1
8 '
9 '------------------------------------------------------------
10 Function GLTOMANY1()
11 On Error GoTo GLTOMANY1_Err
12
13 DoCmd.OpenQuery "APPEND_TAMT_AS_CREDIT_GLTOMANY", acViewNormal, acEdit
14 DoCmd.OpenQuery "APPEND_TAMT_AS_DEBIT_GLTOMANY", acViewNormal, acEdit
15 DoCmd.OpenQuery "APPEND_CUST_CREDITS_GLMANY", acViewNormal, acEdit
16 DoCmd.OpenQuery "DELETEFROMMANYACCTS", acViewNormal, acEdit
17 DoCmd.OpenQuery "DELETGLTOMANY", acViewNormal, acEdit
18 DoCmd.close acForm, "GLTOMANY"
19 DoCmd.OpenForm "GLTOMANY", acNormal, "", "", , acNormal
20 MsgBox "Transaction was successfully saved.", vbInformation, "DATAPACK Release 0.2"
21
22
23 GLTOMANY1_Exit:
24 Exit Function
25
26 GLTOMANY1_Err:
27 MsgBox Error$
28 Resume GLTOMANY1_Exit
29
30 End Function
L:\BlackBerry\documents\dell\SAT_DATAPACK\DATAPACK_R2.mdb Monday, July 19, 2010
Module: Converted Macro- MANY2CUST Page: 19

Properties
Container: Modules DateCreated: 2/21/2009 12:17:26 AM
LastUpdated: 2/21/2009 12:17:26 AM Owner: admin
UserName: admin

Code
1 Attribute VB_Name = "Converted Macro- MANY2CUST"
2 Option Compare Database
3 Option Explicit
4
5 '------------------------------------------------------------
6 ' MANY2CUST
7 '
8 '------------------------------------------------------------
9 Function MANY2CUST()
10 On Error GoTo MANY2CUST_Err
11
12 DoCmd.OpenQuery "APPEND_TAMT_AS_DEBIT_MANY2CUST", acViewNormal, acEdit
13 DoCmd.OpenQuery "APPEND_TAMT_AS_CREDIT_MANY2CUST", acViewNormal, acEdit
14 DoCmd.OpenQuery "APPEND_AMT_AS_DEBIT_MANY2CUST", acViewNormal, acEdit
15 DoCmd.OpenQuery "APPEND_CUST_CREDITS_MANY2CUST", acViewNormal, acEdit
16 DoCmd.OpenQuery "DELETEFROM_MANYTOCUST", acViewNormal, acEdit
17 DoCmd.OpenQuery "DELETEFROMMANYACCTS_MANYTOCUST", acViewNormal, acEdit
18 DoCmd.close acForm, "MANYTOCUST"
19 DoCmd.OpenForm "MANYTOCUST", acNormal, "", "", , acNormal
20 MsgBox "Transaction Was Successully Saved.", vbInformation, "DATAPACK Release 0.2"
21
22
23 MANY2CUST_Exit:
24 Exit Function
25
26 MANY2CUST_Err:
27 MsgBox Error$
28 Resume MANY2CUST_Exit
29
30 End Function
L:\BlackBerry\documents\dell\SAT_DATAPACK\DATAPACK_R2.mdb Monday, July 19, 2010
Module: Converted Macro- MANY2CUST1 Page: 20

Properties
Container: Modules DateCreated: 2/21/2009 12:16:47 AM
LastUpdated: 2/21/2009 12:16:47 AM Owner: admin
UserName: admin

Code
1 Attribute VB_Name = "Converted Macro- MANY2CUST1"
2 Option Compare Database
3 Option Explicit
4
5
6 '------------------------------------------------------------
7 ' MANY2CUST1
8 '
9 '------------------------------------------------------------
10 Function MANY2CUST1()
11 On Error GoTo MANY2CUST1_Err
12
13 DoCmd.OpenQuery "APPEND_TAMT_AS_DEBIT_MANY2CUST", acViewNormal, acEdit
14 DoCmd.OpenQuery "APPEND_TAMT_AS_CREDIT_MANY2CUST", acViewNormal, acEdit
15 DoCmd.OpenQuery "APPEND_AMT_AS_DEBIT_MANY2CUST", acViewNormal, acEdit
16 DoCmd.OpenQuery "APPEND_CUST_CREDITS_MANY2CUST", acViewNormal, acEdit
17 DoCmd.OpenQuery "DELETEFROM_MANYTOCUST", acViewNormal, acEdit
18 DoCmd.OpenQuery "DELETEFROMMANYACCTS_MANYTOCUST", acViewNormal, acEdit
19 DoCmd.close acForm, "MANYTOCUST"
20 MsgBox "Transaction Was Successully Saved.", vbInformation, "DATAPACK Release 0.2"
21
22
23 MANY2CUST1_Exit:
24 Exit Function
25
26 MANY2CUST1_Err:
27 MsgBox Error$
28 Resume MANY2CUST1_Exit
29
30 End Function
L:\BlackBerry\documents\dell\SAT_DATAPACK\DATAPACK_R2.mdb Monday, July 19, 2010
Module: Converted Macro- MANYTOGL Page: 21

Properties
Container: Modules DateCreated: 2/21/2009 7:32:06 AM
LastUpdated: 2/21/2009 7:32:06 AM Owner: admin
UserName: admin

Code
1 Attribute VB_Name = "Converted Macro- MANYTOGL"
2 Option Compare Database
3 Option Explicit
4
5
6 '------------------------------------------------------------
7 ' MANYTOGL
8 '
9 '------------------------------------------------------------
10 Function MANYTOGL()
11 On Error GoTo MANYTOGL_Err
12
13 DoCmd.OpenQuery "APPEND_TAMT_AS_CREDIT_MANYTOGL", acViewNormal, acEdit
14 DoCmd.OpenQuery "APPEND_TAMT_AS_DEBIT_MANYTOGL", acViewNormal, acEdit
15 DoCmd.OpenQuery "APPEND_CUST_CREDITS_MANYTOGL", acViewNormal, acEdit
16 DoCmd.OpenQuery "DELETEFROM_MANYACCTS_MANY2GL", acViewNormal, acEdit
17 DoCmd.OpenQuery "DELETEFROMMANYTOGL", acViewNormal, acEdit
18 DoCmd.close acForm, "MANYTOGL"
19 DoCmd.OpenForm "MANYTOGL", acNormal, "", "", , acNormal
20 MsgBox "Transaction was successfully saved.", vbInformation, "DATAPACK Release 0.2"
21
22
23 MANYTOGL_Exit:
24 Exit Function
25
26 MANYTOGL_Err:
27 MsgBox Error$
28 Resume MANYTOGL_Exit
29
30 End Function
L:\BlackBerry\documents\dell\SAT_DATAPACK\DATAPACK_R2.mdb Monday, July 19, 2010
Module: Converted Macro- MANYTOGL1 Page: 22

Properties
Container: Modules DateCreated: 2/21/2009 7:33:58 AM
LastUpdated: 2/21/2009 7:33:58 AM Owner: admin
UserName: admin

Code
1 Attribute VB_Name = "Converted Macro- MANYTOGL1"
2 Option Compare Database
3
4 '------------------------------------------------------------
5 ' MANYTOGL1
6 '
7 '------------------------------------------------------------
8 Function MANYTOGL1()
9 On Error GoTo MANYTOGL1_Err
10
11 DoCmd.OpenQuery "APPEND_TAMT_AS_CREDIT_MANYTOGL", acViewNormal, acEdit
12 DoCmd.OpenQuery "APPEND_TAMT_AS_DEBIT_MANYTOGL", acViewNormal, acEdit
13 DoCmd.OpenQuery "APPEND_CUST_CREDITS_MANYTOGL", acViewNormal, acEdit
14 DoCmd.OpenQuery "DELETEFROM_MANYACCTS_MANY2GL", acViewNormal, acEdit
15 DoCmd.OpenQuery "DELETEFROMMANYTOGL", acViewNormal, acEdit
16 DoCmd.close acForm, "MANYTOGL"
17 MsgBox "Transaction was successfully saved.", vbInformation, "DATAPACK Release 0.2"
18
19
20 MANYTOGL1_Exit:
21 Exit Function
22
23 MANYTOGL1_Err:
24 MsgBox Error$
25 Resume MANYTOGL1_Exit
26
27 End Function
L:\BlackBerry\documents\dell\SAT_DATAPACK\DATAPACK_R2.mdb Monday, July 19, 2010
Module: Converted Macro- Quiting Page: 23

Properties
Container: Modules DateCreated: 8/5/2006 12:50:15 PM
LastUpdated: 8/5/2006 12:50:15 PM Owner: admin
UserName: admin

Code
1 Attribute VB_Name = "Converted Macro- Quiting"
2 Option Compare Database
3 Option Explicit
4
5 '------------------------------------------------------------
6 ' Quiting_Waiting
7 '
8 '------------------------------------------------------------
9 Function Quiting_Waiting()
10 On Error GoTo Quiting_Waiting_Err
11
12 DoCmd.OpenForm "QuitScreen", acNormal, "", "", acReadOnly, acNormal
13 DoCmd.CancelEvent
14
15
16 Quiting_Waiting_Exit:
17 Exit Function
18
19 Quiting_Waiting_Err:
20 MsgBox Error$
21 Resume Quiting_Waiting_Exit
22
23 End Function
24
25
L:\BlackBerry\documents\dell\SAT_DATAPACK\DATAPACK_R2.mdb Monday, July 19, 2010
Module: Converted Macro- TILLTILLTRANSF Page: 24

Properties
Container: Modules DateCreated: 2/21/2009 1:47:23 AM
LastUpdated: 2/21/2009 1:47:23 AM Owner: admin
UserName: admin

Code
1 Attribute VB_Name = "Converted Macro- TILLTILLTRANSF"
2 Option Compare Database
3
4 '------------------------------------------------------------
5 ' TILLTILLTRANSF
6 '
7 '------------------------------------------------------------
8 Function TILLTILLTRANSF()
9 On Error GoTo TILLTILLTRANSF_Err
10
11 ' APPENDS TO INTERNAL VOUCHERS TABEL
12 DoCmd.OpenQuery "APPENDFROMTILLTOINTER", acViewNormal, acEdit
13 ' APPENDS FIRST DEBIT TO A ROW IN INTERNAL REPO
14 DoCmd.OpenQuery "FIRSTAPPTOINTREP_TILL TOTILL", acViewNormal, acEdit
15 ' APPENDS LAST CREDIT TO A ROW IN INTERNAL REPO
16 DoCmd.OpenQuery "LASTAPPTOINTREP_TILL TOTILL", acViewNormal, acEdit
17 ' APPEND CURRENT BALANCE FOR THE DEBIT VALUE
18 DoCmd.RunMacro "UPDATECHARTBALNCE", , ""
19 DoCmd.OpenQuery "SETOPENBALINTERREP", acViewNormal, acEdit
20 DoCmd.OpenQuery "DELETEFROMTILLTOTIL", acViewNormal, acEdit
21 MsgBox "Cash Was Successfully Transfered.", vbInformation, "DATAPACK Release 0.2"
22
23
24 TILLTILLTRANSF_Exit:
25 Exit Function
26
27 TILLTILLTRANSF_Err:
28 MsgBox Error$
29 Resume TILLTILLTRANSF_Exit
30
31 End Function
L:\BlackBerry\documents\dell\SAT_DATAPACK\DATAPACK_R2.mdb Monday, July 19, 2010
Module: modCName Page: 25

Properties
Container: Modules DateCreated: 7/7/2006 12:58:27 PM
LastUpdated: 7/7/2006 12:58:27 PM Owner: admin
UserName: admin

Code
1 Attribute VB_Name = "modCName"
2 Option Compare Database
3
4 Private Declare Function apiGetComputerName Lib "kernel32" Alias _
5 "GetComputerNameA" (ByVal lpBuffer As String, nSize As Long) As Long
6 Function fOSMachineName() As String
7 'Returns the computername
8 Dim lngLen As Long, lngX As Long
9 Dim strCompName As String
10 lngLen = 16
11 strCompName = String$(lngLen, 0)
12 lngX = apiGetComputerName(strCompName, lngLen)
13 If lngX <> 0 Then
14 fOSMachineName = Left$(strCompName, lngLen)
15 Else
16 fOSMachineName = ""
17 End If
18 End Function
19
20
L:\BlackBerry\documents\dell\SAT_DATAPACK\DATAPACK_R2.mdb Monday, July 19, 2010
Module: modUser Page: 26

Properties
Container: Modules DateCreated: 7/7/2006 12:58:27 PM
LastUpdated: 7/7/2006 12:58:27 PM Owner: admin
UserName: admin

Code
1 Attribute VB_Name = "modUser"
2 Option Compare Database
3
4 Private Declare Function apiGetUserName Lib "advapi32.dll" Alias _
5 "GetUserNameA" (ByVal lpBuffer As String, nSize As Long) As Long
6
7 Function fOSUserName() As String
8 ' Returns the network login name
9 Dim lngLen As Long, lngX As Long
10 Dim strUserName As String
11 strUserName = String$(254, 0)
12 lngLen = 255
13 lngX = apiGetUserName(strUserName, lngLen)
14 If lngX <> 0 Then
15 fOSUserName = Left$(strUserName, lngLen - 1)
16 Else
17 fOSUserName = ""
18 End If
19 End Function
20
21

You might also like