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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Try to set a recordset for a report ...

Status
Not open for further replies.

SasaGrido

Programmer
Jul 20, 2006
2
MD
Hi all.
When I try to set a recordset for a report appear an error message:

Run-time error 2593
This feature is not available in an MDB.

My source code is simply:

Dim Rs as ADODB.Recordset

Set Rs = New ADODB.Recordset

SqlString = "SELECT * FROM Table"
Rs.Open SqlString, conn

Set Me.Recordset = Rs

.....

Such kind of code work for a form but not for a report.
Someone can help me??

Thanks
 
You want to use the RecordSource property. Also you can set the RecordSource to the SQL string itself.

Code:
SqlString = "SELECT * FROM Table"
Me.RecordSource = SqlString
 
I was trying to do the same thing. Check out this discussion thread. It helped me out greatly.

thread705-1254088

Hope it helps.
 
Thanks all.
I know that is possible to use RecordSource property but Access don't like sql string like SQL Server :)

I made another way ... I created by query a temporary table and attached my report to this temporary table.
I think that it is a good way for to not lose time to change sql sintax string.

Have a nice day
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top