Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 30th, 2012, 03:36 AM
Registered User
 
Join Date: Sep 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Disconnected recordset as Report Source

Using VBA in Access 2007, I've opened a connection, created an ADO recordset, and closed the connecton. Now I need to use the recordset as the source to populate a report. (Display only, no edits). Populating a form this way is easy, after disconnecting the recordset I just set the controlsource for each control on the form to the name of a field in the recordset. That's not working for a report.
Code opens the report in design mode, hidden, but on trying to bind report fields to recordset field names I get error 2465 - can't find the field. Double/Triple-checked spelling and that's not the issue.

reportname.recordset is not available because I'm not using an ADP.

Can anyone explain the syntax to accomplish binding a report to a disconnected ADO recordset in VBA without resorting to temp tables?





Similar Threads
Thread Thread Starter Forum Replies Last Post
Recordset retrieving Source ichabob Access VBA 2 December 26th, 2006 12:45 PM
Dcount with local disconnected recordset DreamEagl Access VBA 7 March 10th, 2006 01:44 PM
Report from disconnected recordset DreamEagl Access VBA 4 January 9th, 2006 04:26 PM
VB Collection object Vs Disconnected Recordset Andypat Pro VB Databases 1 February 15th, 2005 06:57 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.