Gustav Brock
Gustav at cactus.dk
Fri Jan 23 01:34:41 CST 2009
Hi Max It is the same thing. If in doubt, just read down a bit at that link. /gustav >>> max.wanadoo at gmail.com 22-01-2009 20:40 >>> Hmm. Not sure we are talking 'bout the same thing. I *think* the best option is just to trap the err.number and handle it. On error goto errhandler <code> If me.parent!ctlname = xys then ' oops no parent bombs down to errhandler <code if parent> Endif Goto jump noParent: <code if no parent> Jump: <more code> Goto exithere Exithere: Exit function/sub Errhandler: Select case err.number Case xyz 'handle no parent Case else Msgbox "Diabolical error - call yourself a programmer" End select resume exithere Max (all air code of course - you don't need examples) -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: 22 January 2009 14:19 To: accessd at databaseadvisors.com Subject: Re: [AccessD] subform close ...solved Hi Max Reminds me ... we were around that back in 2003: http://databaseadvisors.com/pipermail/accessd/2003-March/003498.html /gustav >>> max.wanadoo at gmail.com 22-01-2009 10:14 >>> Hi William, If there is ever going to be a case where the subform is opened as a main form in its own right then you might want to put a test in there to see if there actually is a "Parent" object. In some of my cases, I have it as a sub and a main with some me.parent code in there. Using Stuart's function to pass args could be utilised along with Rocky's parsing system. Cool eh? Max