Question : error 429 ActiveX component can't create object

I hava an adp project P1 connected to SQL Server. I created another adp project P1 without a connection, and imported all forms, queries and modules from P1.
In P2, I made sure the references were the same as in P1.

One of the form in P1 was not connected to any recordsource; the recordset was determined at run-tim from the attached code snipped. The fomr is launched from a button in splash screen. It worked and still owrks well in P1.

It should work the same in P2. However, I get "error 429 ActiveX component can't create object" on the Set Me.Recordset = rsP line.

I HAVE THE SAME REFERENCES IN BOTH PROJECTS, BUT ONLY ONE OF THEM WORKS!
AND I  EVEN TRIED TO DISCARD THE 3.6 DAO LIBRARY IN P2, TO NO AVAIL!
Code Snippet:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
Private Sub Form_Open(Cancel As Integer)
    Dim SQL As String, sSourcePar As String, sSourcePeriodes As String
    Dim cnUtil As New ADODB.Connection
    SQL = "SELECT ..."
    cnUtil.Open sDemelerChaine(sConnUtil)
    cnQual.Open sDemelerChaine(sConnQual)
    rsP.CursorLocation = adUseClient
    rsP.Open SQL, cnUtil, adOpenStatic
    rsPer.Open "tbPériodeLieux", cnQual
    Set Me.Recordset = rsP
    DoCmd.Maximize
End Sub

Answer : error 429 ActiveX component can't create object

Problem solved. I changed my reference from MS Office 12.0 Object Library to 10.
Office 12 remained there although Offfice 2007 had been uninstalled.
Random Solutions  
 
programming4us programming4us