richard_lowenthal
New member
- Local time
- Today, 11:57
- Joined
- Sep 19, 2014
- Messages
- 1
Hi, I'm trying to the following sub to automate the creation of RecordSets but I'm confuse how to get it done properly.
Public Sub OpenRecordSet(SQLString As String, NameRecordset As Object)
Set NameRecordset = New ADODB.Recordset
NameRecordset.Open SQLString, adOpenStatic, adLockOptimistic
I want to pass the name of the recordset as a parameter but I don't know how to set it.
Thanks in advance.
Public Sub OpenRecordSet(SQLString As String, NameRecordset As Object)
Set NameRecordset = New ADODB.Recordset
NameRecordset.Open SQLString, adOpenStatic, adLockOptimistic
I want to pass the name of the recordset as a parameter but I don't know how to set it.
Thanks in advance.