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!

DAO / ADO to reach a table in a second db

Status
Not open for further replies.

smitan

Programmer
May 11, 2002
115
DK
Front-end is Access.ADP, back-end is SQL server. I have no problem in getting the data from a table in a second Jet database to be shown and edited in a form using DAO although I would prefer ADO.
For som reason it is for me impossible to do the same in a report.

In the Form I use:
Set dbs=DBEngine.OpenDatabase(PATH)
Set rst = dbs.OpenRecordset("Select ....", dbOpenDynaset)
Set Me.Recordset = rst

This gives an updatable recordset.
When using the same in a report I get an error:
"The object your entered is not a valid Recordset property."

How can I get a good recordset???
Greetings, Smitan
 
With a report you would just make the recordset property:

Select * From MyTable
 
Thanks for answering.
No, I can't do so, as the table is in Second.MDB and I need the data in MyDb.ADP, which is ok for a form, but not for a report.
Greetings, Smitan.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top