Binding Access controls to fields in ADO recordsets

From: Bill Leddy (Leddy_at_discussions.microsoft.com)
Date: 08/30/04


Date: Mon, 30 Aug 2004 09:25:02 -0700

How do you bind a control on an Access form to a field in an ADO recordset
which has no backend or underlying table?

Using Visual Basic, I have:
Created a NEW ADO recordset
Appended fields
Opened the recordset
Added rows of data

In the Access form, I have bound the form to the recordset by setting the
recordset property of the form.

I can navigate the recordset using the form. In the Visual Basic
environment, I can examine the properties of the recordset and see the values
change as I move from record to record.

When I try to set the controlsource of a textbox on the form to the name of
a field in the recordset, "#Error" is displayed in the text box on the form.



Relevant Pages

  • Re: Select query with parameters
    ... I can use data grid control if it will be better for my situtaion. ... When you Open a recordset you pass an SQL query statement as a string. ...
    (microsoft.public.vb.database.ado)
  • Re: Me! vs Me. (was temporarily Re: !fidlname vs .controlname)
    ... .controlname is to refer to a control (and if it is not on the form, then the recordset will be searched) ... change the NAME of another control on your form --> Test whose ControlSource is something else and is filled out ... In this case, however, the bang and the dot can be interchanged. ...
    (microsoft.public.access.formscoding)
  • Re: Reference forms and fields with variables
    ... There are so many ambiguities here, that it may not really help to follow ... If Field2 is a field in the underlying recordset, ... but the reference is unstable. ... LinkChildFields property of a subform is NOT represented by a control in the ...
    (microsoft.public.access.formscoding)
  • Re: DataGrid not showing programmatic changes
    ... It's been awhile since I've used the DataEnvironment... ... The DataGrid is usually bound to a Data control which in turn ... rsCashbook is a recordset of that Connection with a source of SELECT * FROM ...
    (microsoft.public.vb.general.discussion)
  • Re: Microsoft Document 210239 returns Error 461
    ... One possibility is that the active control is a control type that does not ... Another possibility is that the recordset variable is defaulting to an ADODB ... > Dim RS As Recordset ... ' Find using Numeric data type key value? ...
    (microsoft.public.access.formscoding)