[AccessD] Forcing Save from on one form from another form

William Hindman wdhindman at dejpolsystems.com
Sat Aug 23 20:58:01 CDT 2008


" just tried one thing and another until I got the behavior I wanted." Rocky

...and here I was thinking I was the only one who worked that way?

William
--------------------------------------------------
From: "Rocky Smolin at Beach Access Software" <rockysmolin at bchacc.com>
Sent: Saturday, August 23, 2008 5:20 PM
To: "'Access Developers discussion and problem solving'" 
<accessd at databaseadvisors.com>
Subject: Re: [AccessD] Forcing Save from on one form from another form

> Shamil:
>
> I got it to work by taking a page from raising kids - I just tried one 
> thing
> and another until I got the behavior I wanted.  But your .Dirty = False
> definitely worked and it's in the code now.
>
>
> 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 Shamil
> Salakhetdinov
> Sent: Saturday, August 23, 2008 11:22 AM
> To: 'Access Developers discussion and problem solving'
> Subject: Re: [AccessD] Forcing Save from on one form from another form
>
> Rocky,
>
> So, .Dirty = True worked or not?
>
> I re-tested to make sure - it works when used from outer form etc.
>
> You might have some tricky coding (that's usual for VBA), when an event is
> (indirectly) chaining a set of other events, which in turn (indirectly)
> chaining other events...
>
> Access developers are always told that MS Access VBA is single-threaded 
> but
> when events "chain-reaction" is getting activated with maybe Timer 
> event(s)
> processed somewhere in the same time then MS Access VBA interpreter goes
> really "crazy", and side effects could be many and unexpected including
> GPF-ing...
>
> Check what happens in your case by using tracing debug.print or writing to 
> a
> log file, and use (static) flags to prevent unexpected/undesired code
> execution sequence...
>
> Maybe I'm exaggerating - could you describe what code flow you have?:
>
> - what control makes subform's field's value changed and subform Dirty, 
> and
> how and in what part of you code you're trying to save subform's edits by
> using .Dirty = False or calling subform's .requery method?...
>
> Thank you.
>
> --
> Shamil
>
>
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin at
> Beach Access Software
> Sent: Saturday, August 23, 2008 9:46 PM
> To: 'Access Developers discussion and problem solving'
> Subject: Re: [AccessD] Forcing Save from on one form from another form
>
> Saving the subform record is no problem.  It's reaching over from the
> sub-form into another unrelated form and saving the record there which has
> had one of its bound fields changed by the sub-form. I tried requrying the
> form but I get that 'Write Conflict' message.
>
>
> 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 Shamil
> Salakhetdinov
> Sent: Saturday, August 23, 2008 9:59 AM
> To: 'Access Developers discussion and problem solving'
> Subject: Re: [AccessD] Forcing Save from on one form from another form
>
> Yes, and additionally another trick (used starting MS Access 2.0 as the
> latter didn't have .Dirty property), which could be useful if your subform
> has just one record - your can .Requery it to save current edits. If your
> subform has several records this trick will also work but then you will 
> have
> to set the proper subform's record position - here .RecordsetClone and
> .Bookmark were usually used...
>
> ==
> Shamil
>
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin at
> Beach Access Software
> Sent: Saturday, August 23, 2008 7:28 PM
> To: 'Access Developers discussion and problem solving'
> Subject: Re: [AccessD] Forcing Save from on one form from another form
>
> Shamil:
>
> So setting .Dirty = False saves the record?
>
> TIA
>
>
> 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 Shamil
> Salakhetdinov
> Sent: Saturday, August 23, 2008 7:38 AM
> To: 'Access Developers discussion and problem solving'
> Subject: Re: [AccessD] Forcing Save from on one form from another form
>
> Hi Rocky,
>
> AFAIKR you can just use:
>
> Access.Application.Forms.mySecondFormName.mySubFormControlName.Form.Dirty 
> =
> False
>
> or if you have an object reference (let's call it subFormControlObjectRef)
> of the second form's subform control then you can use:
>
> subFormControlObjectRef.Form.Dirty = False
>
> --
> Shamil
>
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin at
> Beach Access Software
> Sent: Saturday, August 23, 2008 6:15 PM
> To: 'Access Developers discussion and problem solving'
> Subject: [AccessD] Forcing Save from on one form from another form
>
> Dear List:
>
> In a sub-form of a second form I am changing the value of a record on a
> third form which is loaded and open.  That form is now dirty and I'd like 
> to
> save the record on that third form from the sub-form.  How can I force a
> save on one form from another form?
>
> MTIA,
>
>
>
> Rocky Smolin
>
> Beach Access Software
>
> 858-259-4334
>
> www.e-z-mrp.com <http://www.e-z-mrp.com/>
>
> www.bchacc.com <http://www.bchacc.com/>
>
>
>
>
>
>
> --
> 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
>
> --
> 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
>
> --
> 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
>
> -- 
> 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