Free for PREMIUM members
Public Function GetADORecordset(ByVal strSQL As String) As ADODB.Recordset
Dim cn As New ADODB.Connection
Dim rst As ADODB.Recordset
Set cn = CurrentProject.Connection
Set rst = New ADODB.Recordset
rst.ActiveConnection = cn
rst.CursorLocation = adUseClient
rst.CursorType = adOpenStatic
rst.LockType = adLockReadOnly
Set rst.ActiveConnection = Nothing
Set GetADORecordset = rst
Open in new window
Set Me.comboName.Recordset = GetADORecordset("SELECT * FROM NameOfTable")
Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.
Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.