[AccessD] Bind Form to RecordSet

Darryl Collins darryl at whittleconsulting.com.au
Mon Feb 25 16:42:02 CST 2013


Agreed. I use DAO for purely 'in house' stuff, that is within the same database (CurrentDB).  But when talking to the 'outside world' for anything from that database I use ADO instead.

Cheers
Darryl

-----Original Message-----
From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of William Benson (VBACreations.Com)
Sent: Tuesday, 26 February 2013 5:05 AM
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] Bind Form to RecordSet

Me bad. You good.
Thx!!!

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Jim Lawrence
Sent: Monday, February 25, 2013 12:51 PM
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] Bind Form to RecordSet

Hi William:

I was using ADO for my MS Access databases since A97. Rarely, have I used anything else except when doing code for Mom and Pop type businesses. Access with a DAO BE can only expand so far. It only took me once or twice to realize that synchronized DAO connections in a network are prone to data corruption so I never made that mistake again.

Also every Microsoft OS since Windows 95 has one version or another of ADO built in to it. 

With ADO and the databases that are associated with that, MS SQL and Oracle and so on, you can stably extend an MS Access FE to thousands of users.

Jim  

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of William Benson
(VBACreations.Com)
Sent: Sunday, February 24, 2013 1:52 PM
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] Bind Form to RecordSet

What the ...???

Maybe I am coming in too late on this thread to understand the import of this statement, which all are apparently taking as fact so I guess I may as well take it as fact too ... but ... I *never* would have thought that access forms could be bound only to adodb recordsets as opposed to DAO recordsets. I mean after all, ADO came along later in the Access lifecycle than DAO, correct? And weren't forms always able to be bound to recordsets?

I feel totally lost in this.

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Salakhetdinov Shamil
Sent: Sunday, February 24, 2013 2:08 PM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Bind Form to RecordSet

 Hi Arthur --

Access forms can be bound to ADODB recordsets only.

-- Shamil

Воскресенье, 24 февраля 2013, 13:16 -05:00 от Arthur Fuller
<fuller.artful at gmail.com>:
>I'm playing around with ways to do this but am running into a problem.
>
>The form_open looks like this:
>
><vba>
>Dim db As DAO.Database
>Dim rs As DAO.Recordset
>Dim strSQL As String
>
>Set db = CurrentDb
>strSQL = "SELECT * FROM Volunteers WHERE LastName IS NOT NULL " & _
>         "ORDER BY LastName"
>'----------------------------------------------------------------------
>------------------------
>' Open the recordset
>'----------------------------------------------------------------------
>------------------------
>Set rs = db.OpenRecordset(strSQL)
>
>With rs
>    If .EOF And .BOF Then
>        MsgBox "No records returned."
>    Else
>        .MoveFirst
>        While Not .EOF
>            Debug.Print rs("VolunteerID"), rs("LastName")
>            .MoveNext
>        Wend
>    End If
>End With
>
>MsgBox "Setting new record source"
>Debug.Print "Setting new record source"
>
>'Here's where I get busted:
>'Set Me.RecordSource = rs
>
>rs.Close
>Set rs = Nothing
>End Sub
></vba>
>
>I read something from microsoft on how to bind a form to a recordset 
>but the example was bound to a SQL Server db, and I wanted to keep it 
>simple - just create a local recordset and then assign it to the
recordsource.
>
>So I'm confused. Every previous time I've altered RecordSource it's 
>been by substituting a string. But the code in the MS example uses 
>exactly the syntax that failed me above.
>
>Any suggestions, people?
>
>--
>Arthur
>--
>AccessD mailing list
>AccessD at databaseadvisors.com
>http://databaseadvisors.com/mailman/listinfo/accessd
>Website:  http://www.databaseadvisors.com

--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com


--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com


--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com


-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list