Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
Password Reminder
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access 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
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 24th, 2004, 03:34 PM
Authorized User
Join Date: Dec 2003
Location: Middletown, CT, USA.
Posts: 81
Thanks: 0
Thanked 0 Times in 0 Posts
Default Display recordset values

Greetings all,

I am trying to display the results of a recordset. What happens is a user opens an Access form. They select a couple of items and the selections get passed to the VB. This is then used to create a recordset. The VB is correctly connecting to the current DB and is returning the proper records, however, I would like to display the results, a table format, on the original form.

Any ideas


Reply With Quote
  #2 (permalink)  
Old March 24th, 2004, 10:22 PM
Authorized User
Join Date: Mar 2004
Location: , , .
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts

This should give you a few pointers.

The first two lines are just to create a record set to mimic what you have stated that you have and that is a valid record set.

Dim rst As New ADODB.Recordset
rst.Open "SELECT SomeID FROM SomeTable", CurrentProject.Connection, adOpenKeyset, adLockReadOnly

Set Me.sfName.Form.Recordset = rst ' This is the line I think you are after

Set ret = Nothing

sfName in this example would be a sub form (datasheet) and you simply assign the record set results to the Recordset property.

Hope this helps...
Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Values from recordset lost after reading vanik.cz Classic ASP Databases 11 January 4th, 2008 07:36 AM
Order a recordset by specific values SoC SQL Language 2 August 28th, 2005 08:27 PM
recordset paging and display resultsets in columns keyvan Classic ASP Databases 1 March 7th, 2005 07:20 AM
how to display recordset in unbound form huela Access VBA 0 October 12th, 2004 11:58 PM

All times are GMT -4. The time now is 07:39 AM.

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