-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCreateDatabaseRecordset
32 lines (29 loc) · 1023 Bytes
/
CreateDatabaseRecordset
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
Public Function CreateDatabaseRecordset( _
db As DAO.Database, _
strSQL As String _
) As DAO.Recordset
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'DATE AUTHOR
'8/6/18 Alejandro
'
'PURPOSE
'Creates a DAO recordset for the given SQL statement and database object
'
'PARAMETERS
' cn Connection object that points to the database where the data will be retrieved from
' strSQL SQL that will create the recordset
'
'TICKETS
'Date Ticket Description
'8/6/18 NHITAP-36 Review General Ledger Tool
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
On Error GoTo Error
'Create recordset
Set CreateDatabaseRecordset = db.OpenRecordset(strSQL, dbOpenSnapshot, dbSQLPassThrough + dbFailOnError)
ExitOnly:
Exit Function
Error:
ProcessErrors
Err.Raise Err.Number, Err.Source, Err.Description, Err.HelpFile, Err.HelpContext
Resume ExitOnly
End Function