Wrox Programmer Forums
|
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 11th, 2007, 12:06 PM
Registered User
 
Join Date: Sep 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Reporting VBA

Hi, I am an experienced VBA user but new to Access reporting. I am trying to assign a recordset to a report that is the result of some coding work done on a query. I have been able to use this query, manipulate the data, and then assign it to a listbox, but I cannot do this to a report (by using the recordsource property). How do you assign data to a report that is not directly from a SQL query or existing table?
 
Old September 11th, 2007, 02:23 PM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

Can you explain what you mean by " I am trying to assign a recordset to a report that is the result of some coding work done on a query."?

It sounds like there is a query. Is it a saved query, or a string in your code?



mmcdonal
 
Old September 11th, 2007, 02:44 PM
Registered User
 
Join Date: Sep 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thanks for responding. The query is a string query run in VBA using the recordset object. I cycle through the recordset looking for certain values which are then used to grab values from additional tables. The recordset is then updated to replace the original values with the new values. I would like to assign the final recordset to a report, but don't know how to do so. Does this make sense?

 
Old September 14th, 2007, 07:08 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,151
Thanks: 2
Thanked 14 Times in 14 Posts
Send a message via ICQ to SerranoG Send a message via AIM to SerranoG
Default

When you find the certain values you seek, append each record into a temporary table and then make THAT the record source of the report.


Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division





Similar Threads
Thread Thread Starter Forum Replies Last Post
Reporting gunjan.sh SQL Language 0 February 17th, 2008 11:37 PM
Code works in Excel VBA but not Access VBA fossx Access VBA 2 May 21st, 2007 08:00 AM
Reporting through XML Somesh C# 2 January 24th, 2007 11:55 PM
Reporting Services mikerowe SQL Server 2000 0 May 22nd, 2005 08:22 PM
Excel VBA to SQL & back to VBA edesousa Excel VBA 1 June 1st, 2004 02:39 AM





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