Stuart McLachlan
stuart at lexacorp.com.pg
Sat Jun 17 05:02:10 CDT 2006
On 18 Jun 2006 at 8:17, Martin Reid wrote: > Yip > But a move next fails. Something simple here I am sure > Since you Dim rstStudent in the on_open , it is local to that procedure and is destroyed at the completion of on_open. Put a Private rststudent As ADODB.Recordset at the head of the form module and don't declare it in the on_open. Then you should be able to do this sort of thing in another procedure: .... rstStudent.MoveNext If Not rstStudent.EOF then For Each fld In rststudent.Fields Me(fld.Name).Value = fld.Value Next End if ... > Martin > > -----Original Message----- > From: "Stuart McLachlan"<stuart at lexacorp.com.pg> > Sent: 6/16/06 11:56:00 PM > To: "Access Developers discussion and problem > solving"<accessd at databaseadvisors.com> Subject: Re: [AccessD] Stored Proc > AGAIN > > On 16 Jun 2006 at 20:09, Martin Reid wrote: > > > I have noticed some odd things in the way 2007 is working with SQL Server > > 2005 but the basic idea here is just that basic and no matter what I have > > tried I cant get it to assign the recordset. > > > > Any help appreciated. This is the last example I have to do so I jsut left > > it for the moment and moved on. > .. > > For Each fld In rststudent.Fields > > Me(fld.Name).Value = fld.Value > > Next > > End If > > What is the problem, doesn't this fill the controls on the form? > > -- > Stuart > > > -- > 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 -- Stuart