[AccessD] Subform requery

Jim Hewson jm.hwsn at gmail.com
Wed Aug 25 09:18:56 CDT 2010


What I've used is either...
On the parent form I use me.refresh
Or if that didn't work correctly (sometimes it just doesn't work) I would use 
Me.subformname.refresh or requery.
I have a complex subform that uses child subforms.  The child forms (grandchild forms to the main form) are exchanged as needed.  That is at a click of button the child form could be one of 15 different sub forms.

In your line of code ... me.sub1.requery should work.

Jim

-----Original Message-----
From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Andrew Lacey
Sent: Wednesday, August 25, 2010 8:52 AM
To: Access Developers discussion and problem solving
Subject: [AccessD] Subform requery

Congrats Jim.
 
Ok to brighten a quiet week here's an actaul honest-to-goodness Access question ("Access, what's that?" I hear you mutter).
 
Using A2K I have an unbound form with some selection fields (2 combos, a check box). The form has a subform which shows certain records depending on what user selects in main form. Simple stuff. Only it doesn't work. In the AfterUpdate of the combos and check box is:
 
me.sub1.form.requery
 
Nothing happens.
 
The subform works. If I change the Recordsource of teh subform to prompt for the info rather than read it from the main form it works. Yet it must recognise the references to the main form because it doesn't ask me for any parameters (which it does, for example, if the main form isn't even open). This is trivial stuff.
I've done it a million times in my old A97 db but I cannot get that subform to respond. Is this an A2k bug or what? Help.
 
Cheers
 
Andy
--
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