Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 2 / May 2007

Tip: Looking for answers? Try searching our database.

set the 'Recordset' property

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Samuel - 27 May 2007 09:46 GMT
Is it possible and how to set the 'Recordset'/'Recordset.Name' property of a
form?

Thank you,
Samuel
Douglas J. Steele - 27 May 2007 12:29 GMT
What version of Access?

Access 2003 (and, I assume, Access 2007) let you set the Recordset property.
Earlier versions don't. See
http://msdn2.microsoft.com/en-us/library/aa173231(office.11).aspx for
details.

I have no idea what you mean by the Recordset.Name property.

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)

> Is it possible and how to set the 'Recordset'/'Recordset.Name' property of
> a form?
>
> Thank you,
> Samuel
David W. Fenton - 27 May 2007 19:22 GMT
> Access 2003 (and, I assume, Access 2007) let you set the Recordset
> property. Earlier versions don't. See
> http://msdn2.microsoft.com/en-us/library/aa173231(office.11).aspx
> for details.

Not true. It works in A2K, which is where this feature was
introduced.

That's why it can only be an ADO recordset that you can assign as a
form's recordset, unfortunately. Or has A2K7 fixed that, by chance?

Signature

David W. Fenton                  http://www.dfenton.com/
usenet at dfenton dot com    http://www.dfenton.com/DFA/

Douglas J. Steele - 28 May 2007 12:51 GMT
>> Access 2003 (and, I assume, Access 2007) let you set the Recordset
>> property. Earlier versions don't. See
[quoted text clipped - 6 lines]
> That's why it can only be an ADO recordset that you can assign as a
> form's recordset, unfortunately. Or has A2K7 fixed that, by chance?

Thanks for the update, David. I still do most of my work in Access 97, so I
haven't actually played with setting the Recordset that much, but everytime
I have, it has been an ADO recordset (usually a detached one)

Are you saying that the Help file is wrong and you can't assign a DAO
recordset?

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

David W. Fenton - 28 May 2007 20:59 GMT
>>> Access 2003 (and, I assume, Access 2007) let you set the
>>> Recordset property. Earlier versions don't. See
[quoted text clipped - 15 lines]
> Are you saying that the Help file is wrong and you can't assign a
> DAO recordset?

The help file doesn't say you can. Read it very carefully -- it is
quite misleading in the way it is structured.

Signature

David W. Fenton                  http://www.dfenton.com/
usenet at dfenton dot com    http://www.dfenton.com/DFA/

Douglas J. Steele - 29 May 2007 11:16 GMT
>>>> Access 2003 (and, I assume, Access 2007) let you set the
>>>> Recordset property. Earlier versions don't. See
[quoted text clipped - 18 lines]
> The help file doesn't say you can. Read it very carefully -- it is
> quite misleading in the way it is structured.

I don't know about that.

http://msdn2.microsoft.com/en-us/library/aa173231(office.11).aspx is fairly
explicit:

"Returns or sets the ADO Recordset or DAO Recordset object representing the
record source for the specified form, report, list box control, or combo box
control. Read/write."

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

David W. Fenton - 29 May 2007 18:51 GMT
>>>>> Access 2003 (and, I assume, Access 2007) let you set the
>>>>> Recordset property. Earlier versions don't. See
[quoted text clipped - 27 lines]
> representing the record source for the specified form, report,
> list box control, or combo box control. Read/write."

That's right -- the recordset of the form can be either DAO or ADO,
but you can't *assign* a DAO recordset created elsewhere as the
form's .Recordset.

In other words, the property is read-only for DAO (i.e., you can't
change it once it's created).

Signature

David W. Fenton                  http://www.dfenton.com/
usenet at dfenton dot com    http://www.dfenton.com/DFA/

David W. Fenton - 29 May 2007 18:58 GMT
>>>>>> Access 2003 (and, I assume, Access 2007) let you set the
>>>>>> Recordset property. Earlier versions don't. See
[quoted text clipped - 34 lines]
> In other words, the property is read-only for DAO (i.e., you can't
> change it once it's created).

Well, I guess that's not correct after all, according to Michael
Kaplan:

 http://trigeminal.com/usenet/usenet022.asp?1033

But I couldn't get a form to accept an ADO recordset for the form's
Recordset property in my own testing.

Signature

David W. Fenton                  http://www.dfenton.com/
usenet at dfenton dot com    http://www.dfenton.com/DFA/

Scott McDaniel - 27 May 2007 12:34 GMT
>Is it possible and how to set the 'Recordset'/'Recordset.Name' property of a
>form?

You simply set it to a valid, open Recordset object:

Dim rst As New ADODB.recordset

rst.Open "SQL", CurrentProject.Connection

Set Me.Recordset = rst

Scott McDaniel
scott@takemeout_infotrakker.com
www.infotrakker.com
Sylvain Lafontaine - 28 May 2007 02:01 GMT
See: http://support.microsoft.com/?kbid=281998
and: http://support.microsoft.com/kb/227053/EN-US/

(The second reference has an exemple with DAO instead of ADO).

Signature

Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC
E-mail: sylvain aei ca (fill the blanks, no spam please)

> Is it possible and how to set the 'Recordset'/'Recordset.Name' property of
> a form?
>
> Thank you,
> Samuel
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.