Show recordset in unbound subform

vgarzon

Registered User.
Local time
Today, 12:03
Joined
Oct 17, 2008
Messages
30
Hi,

I think that I'm stuck in a glass of water, but I've been trying to do this for a couple of hours with no results. Maybe you can help me as I'm not an experienced VBA programmer.

I'm trying to show the data retrieved in an ADO recordset, in an unbound subform.

I do this to get the data in the recordset:
Code:
     Dim cnLAO As ADODB.Connection
     Set cnLAO = New ADODB.Connection
    
     Dim strCon1 As String
     strCon1 = "PROVIDER=SQLOLEDB;DATA SOURCE=SERVER1C;INITIAL CATALOG=ToolXYZ;INTEGRATED SECURITY=sspi;"
     
     cnLAO.Open strCon1
    
     Dim rsEmpInfo As ADODB.Recordset
     Set rsEmpInfo = New ADODB.Recordset
    
     Dim strSP1 As String
     strSP1 = "EXEC sp_Get_Tool_User_Information NULL, NULL, NULL, NULL, NULL, 'ZONV', 'VIC', 'GAR', 'A'"
    
     rsEmpInfo.ActiveConnection = cnLAO
     rsEmpInfo.Open strSP1

I test the results of the recordset and they work perfectly. Now, I need to show all the results in a subform, but I don't know how to do this.

Can you please give me very specific details of how to do it?

Thanks in advance,

Victor
 

Users who are viewing this thread

Back
Top Bottom