[AccessD] First Record of Subform

Andy Lacey andy at minstersystems.co.uk
Thu Nov 20 06:59:51 CST 2003


Mark
How about something like this in the OnCurrent of SF1:

Me.Parent.sub2.Form.Requery
If Me.Parent.sub2.Form.Recordsetclone.RecordCount<>0 then
  Me.Parent.sub2.Form.Recordsetclone.MoveFirst
  Me.Parent.sub2.Form.Bookmark=Me.Parent.sub2.Form.Recordsetclone.Bookmark
End If


Haven't tested it, but seems about right.

Andy Lacey
http://www.minstersystems.co.uk 






> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com 
> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of 
> Mark A Matte
> Sent: 20 November 2003 05:28
> To: accessd at databaseadvisors.com
> Subject: RE: [AccessD] First Record of Subform
> 
> 
> Sorry Charlotte...but thats not the case...I requery the 
> subform of SF2 on 
> each ONCURRENT of SF1...and whatever record has focus 
> prior...still has 
> focus after the REQUERY.
> 
> Other ideas?
> 
> Thanks,
> 
> Mark
> 
> 
> >From: "Charlotte Foust" <cfoust at infostatsystems.com>
> >Reply-To: Access Developers discussion and problem
> >solving<accessd at databaseadvisors.com>
> >To: "Access Developers discussion and problem 
> >solving"<accessd at databaseadvisors.com>
> >Subject: RE: [AccessD] First Record of Subform
> >Date: Wed, 19 Nov 2003 12:55:23 -0800
> >
> >Requery the subform.  That always sets the record pointer to 
> the first 
> >record.
> >
> >Charlotte Foust
> >
> >-----Original Message-----
> >From: Mark A Matte [mailto:markamatte at hotmail.com]
> >Sent: Wednesday, November 19, 2003 12:51 PM
> >To: accessd at databaseadvisors.com
> >Subject: [AccessD] First Record of Subform
> >
> >
> >Hello All,
> >
> >Please forgive the confusing question...but:
> >
> >In A97 I have a subform(SF2) that is refreshed each time a different 
> >record is selected in another subform(SF1).  Both are 
> continuous forms.  
> >When I
> >
> >click  a record in SF1...SF2 displays 5 records related to SF1 
> >record...I click on record#5 in SF2....now I select a 
> different record 
> >in SF1...and SF2
> >displays 8 records...but record#5 has focus.
> >
> >How do I refresh a subform and cause it to always go to the first 
> >record?
> >
> >Thanks,
> >
> >Mark
> >
> >_________________________________________________________________
> >Groove on the latest from the hot new rock groups!  Get downloads, 
> >videos, and more here.  
> >http://special.msn.com/entertainment/wiredformusic.armx
> >
> >_______________________________________________
> >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
> 
> _________________________________________________________________
> >From the hottest toys to tips on keeping fit this winter, 
> you'll find a
> range of helpful holiday info here.  
> http://special.msn.com/network/happyholidays.armx
> 
> _______________________________________________
> AccessD mailing list
> AccessD at databaseadvisors.com 
> http://databaseadvisors.com/mailman/listinfo/a> ccessd
> Website: 
> http://www.databaseadvisors.com
> 
> 




More information about the AccessD mailing list