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 May 31st, 2011, 01:22 PM
Registered User
 
Join Date: May 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Display recordset contents on a form

I'm developing a data retrieval application in Access 2010 VBA in which the user chooses from lists of tables, fields, and rows. VBA code generates a SQL statement from the user's choices in listboxes and then opens an ADODB.Recordset. So far so good.

How may I best display the recordset data? I'd like to use a grid or datasheet view but I can't figure out how to do this. Access 2010 won't accept any grid control I've tried and subforms just aren't made for this purpose. Can anyone out there tell me how to get this done?
 
Old June 8th, 2011, 01:40 PM
Authorized User
 
Join Date: Jul 2003
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I would just use a form with its default view set to Continuous Forms and its recordsource set to your query. This way I could program events behind each field displayed if I wanted.
 
Old June 8th, 2011, 02:06 PM
Friend of Wrox
 
Join Date: Sep 2010
Posts: 245
Thanks: 5
Thanked 24 Times in 23 Posts
Default

I agree. Use a form bound to the SQL.
__________________
Boyd Trimmell aka HiTechCoach (.com)
Microsoft Access MVP Alumni 2010-2015





Similar Threads
Thread Thread Starter Forum Replies Last Post
How to display the arraylist contents into a table yzlin04 ASP.NET 2.0 Basics 2 July 27th, 2007 06:23 AM
display contents from aspx in IE thas123 ASP.NET 2.0 Basics 0 March 25th, 2007 02:54 AM
Using innerHTML to display contents of other pages jxn Javascript How-To 1 February 9th, 2006 01:37 AM
VBA Script to search fields and display contents Jwill1014 Access VBA 8 June 2nd, 2005 07:33 AM
how to display recordset in unbound form huela Access VBA 0 October 12th, 2004 11:58 PM





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