Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access 2000 Assigning ADODB.recordset to a report 1

Status
Not open for further replies.

martync

Programmer
Mar 4, 2002
7
AU
Hi All,
I've searched most of the morning and still can't find an answer to this...
I am generating an ADODB recordset using a form to gather info to generate required SQL during the report_open event. I want to assign the recovered rst to the report.

Private Sub Report_Open(Cancel As Integer)
Dim rst As New ADODB.Recordset

DoCmd.OpenForm "fmQueryMaker", , , , , acDialog

Call rst.Open(Forms!fmQueryMaker!SQL_string, CurrentProject.Connection, adOpenKeyset, adLockReadOnly)

Set Me.Recordset = rst
End Sub

The last line returns error "method or data member not found" Is the code not the correct format for Access 2000?


 
You need not to use ADODB, Try That :

Private Sub Report_Open(Cancel As Integer)


DoCmd.OpenForm "frmQueryMaker", , , , acFormEdit


Me.RecordSource = Forms!frmquerymaker!sql_String



End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top