[AccessD] subform close

William Hindman wdhindman at dejpolsystems.com
Wed Jan 21 12:55:02 CST 2009


...the basic scary scenario I'm trying to work out ...I'm using a treeview 
switchboard hosting the application's forms in a subform ...resizing 
everything to full screen (try that with a subform!) ...and thus there is no 
master child link between the host and the sub ...its a very appealing gui 
...I can pass arguments from the node when opening the subform ...but I 
don't want the user to be able to switch subforms while there is still 
something going on  ...thus the need to control the subform close from the 
subform itself.

William

--------------------------------------------------
From: "jwcolby" <jwcolby at colbyconsulting.com>
Sent: Wednesday, January 21, 2009 12:51 PM
To: "Access Developers discussion and problem solving" 
<accessd at databaseadvisors.com>
Subject: Re: [AccessD] subform close

> Gustav brings up a good point though, trying to do this from
> inside of the subform might cause a page fault as the code
> that is running that unloads the subform may not end before
> the subform unloads.
>
> I have never tried to unload a subform from inside of itself.
>
> John W. Colby
> www.ColbyConsulting.com
>
>
> William Hindman wrote:
>> ...why does anyone? ...like all programmers I'm a masochist at heart :)
>>
>> ...experimenting with a new gui ...need to work out the kinks :)
>>
>> ...and I'm working on just that approach :)
>>
>> William
>>
>> --------------------------------------------------
>> From: "Gustav Brock" <Gustav at cactus.dk>
>> Sent: Wednesday, January 21, 2009 4:33 AM
>> To: <accessd at databaseadvisors.com>
>> Subject: Re: [AccessD] subform close
>>
>>> Hi William
>>>
>>> Why are you doing this to yourself?
>>>
>>> That said, you may have to move the focus off the button as the first
>>> thing.
>>> Then, shouldn't this work? Haven't tried myself though:
>>>
>>>  Me.Parent!NameOfSubformControl.Value = strNameOfNewSubform
>>>
>>> or
>>>
>>>  Me.Parent!NameOfSubformControl.Value = Null
>>>
>>> You may need to move the code to the main form and call it from the
>>> subform to not let the subform kick the feet of itself away.
>>>
>>> /gustav
>>>
>>>
>>>>>> wdhindman at dejpolsystems.com 21-01-2009 08:26 >>>
>>> ...closes host and sub :(
>>>
>>> ...naming the sub instead doesn't change what I see ...the acSaveAll
>>> works,
>>> the form just doesn't disappear from the subform control
>>>
>>> ...if I change the mainform subform sourceobject from the host form, the
>>> form is either replaced by the new sourceobject or the subform goes 
>>> blank
>>> if
>>> I set it to ""
>>>
>>> ...but that leaves me vulnerable to users closing an open subform from 
>>> the
>>> host form without a proper close
>>>
>>> ...trying to workout the semantics for setting the mainform subform
>>> sourceobject from the subform ...this should be simple but I'm missing
>>> something.
>>>
>>> William
>>>
>>> --------------------------------------------------
>>> From: "Rocky Smolin at Beach Access Software" <rockysmolin at bchacc.com>
>>> Sent: Wednesday, January 21, 2009 12:08 AM
>>> To: "'Access Developers discussion and problem solving'"
>>> <accessd at databaseadvisors.com>
>>> Subject: Re: [AccessD] subform close
>>>
>>>> Wait, I see.  I think you have to specify the form name of the host 
>>>> form:
>>>> DoCmd.Close acForm, ObjectName
>>>>
>>>>
>>>> Rocky Smolin
>>>> Beach Access Software
>>>> 858-259-4334
>>>> www.e-z-mrp.com
>>>> www.bchacc.com
>>>>
>>>>
>>>>
>>>> -----Original Message-----
>>>> From: accessd-bounces at databaseadvisors.com
>>>> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of William
>>>> Hindman
>>>> Sent: Tuesday, January 20, 2009 8:47 PM
>>>> To: Access Developers discussion and problem solving
>>>> Subject: [AccessD] subform close
>>>>
>>>> ...subform hosted on non-linked main form
>>>>
>>>> ...command button on subform
>>>>
>>>> DoCmd.Close ...button animates but form doesn't close
>>>>
>>>> ...thinking that I'm probably going to have to set the mainform subform
>>>> sourceobject to "" or another object and clean up anything on the open
>>>> subform such as dirty data before I do it.
>>>>
>>>> ...anyone done this and have tested code or suggestions?
>>>>
>>>> William
>>>
>>> -- 
>>> 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
> 




More information about the AccessD mailing list