Bob Heygood
bheygood at abestsystems.com
Fri Jan 19 13:47:16 CST 2007
Hello Andy, Thanks so much for responding. This will help me a lot. And of course I need to remember how to accurately refer to the subform as opposed to the control it resides in. That is always a challenge for me. Best, Bob Heygood -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Andy Lacey Sent: Thursday, January 18, 2007 9:50 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Goto First Record subform Hi Bob Yea this is a problem I've come across. Here's what I do (in a function on main form) after requerying the subform With Me.subx.form if .recordsetclone.recordcount>0 then .recordsetclone.movefirst .bookmark=.recordsetclone.bookmark end if End with HTH -- Andy Lacey http://www.minstersystems.co.uk > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Bob Heygood > Sent: 18 January 2007 23:56 > To: 'Access Developers discussion and problem solving' > Subject: [AccessD] Goto First Record subform > > > Hello to the list, > > I have a form with a subform on it. > The subform is synced with main form via the subform's record source > and a combo on the main form. > > Everything works great, except that if I am on record number > 4 on the subform and select a different value with the combo on the > main form, the subform is blank unless there is at least 4 records. I > want the subform to go to the first record each time I change the > combo. > > I have tried to use different variations of : > > DoCmd.GoToRecord acDataForm, strFormName, acFirst > > Using a public function in the sub form doesn't seem to work. > > Using the afterupdate event in the combo on the main form, it tells me > that the form is not open. I have tried different ways of referring to > the subform, and even setting the focus to the subform. > > I know, it would be better if I used the standard linking child/parent > scheme, but as someone here the other day said, I have reasons why > not... > > > TIA > > Bob Heygood > > > > -- > 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