G
Guest
I have an Access 2000 adp client working with SQL Server 2000.
I have an adp form and a subform. The subform is populated from an ado
recordset:
Dim RS as new adodb.Recordset
Then i get some data to fill in the recordset, and finally updates recordset
of subform SF:
Set Me.SF.Form.Recordset = RS
This works fine.
I export the subform to excel by pressing a button on the main form. Here is
the code:
Private Sub CmdExport_Click()
On Error GoTo Errorhandler
Dim RS As New ADODB.Recordset
RS.CursorLocation = adUseClient 'has no effect
RS.CursorType = adOpenStatic 'has no effect
Set RS = Me.SF.Form.Recordset
Call PublicExportToExcel(RS)
Errorhandler:
End Sub
If the subform is not sorted everything works fine. If the subform has been
sorted Access crashes on the line:
Set RS = Me.SF.Form.Recordset
I get the following error:
Runtime error 429
ActiveX component can't create object
What may be missing here?
Regards
Tore
I have an adp form and a subform. The subform is populated from an ado
recordset:
Dim RS as new adodb.Recordset
Then i get some data to fill in the recordset, and finally updates recordset
of subform SF:
Set Me.SF.Form.Recordset = RS
This works fine.
I export the subform to excel by pressing a button on the main form. Here is
the code:
Private Sub CmdExport_Click()
On Error GoTo Errorhandler
Dim RS As New ADODB.Recordset
RS.CursorLocation = adUseClient 'has no effect
RS.CursorType = adOpenStatic 'has no effect
Set RS = Me.SF.Form.Recordset
Call PublicExportToExcel(RS)
Errorhandler:
End Sub
If the subform is not sorted everything works fine. If the subform has been
sorted Access crashes on the line:
Set RS = Me.SF.Form.Recordset
I get the following error:
Runtime error 429
ActiveX component can't create object
What may be missing here?
Regards
Tore