[AccessD] Form BeforeUpdate

Mark A Matte markamatte at hotmail.com
Tue Jun 24 12:04:49 CDT 2008



Glad to know...for a minute I was thinking I must have typed something really stupid to get that kind of response from Drew...then I was looking for a correlation between VW Bug distributor and a form losing focus???

Did we actually answer the original question somewhere????

Mark A. Matte


> Date: Tue, 24 Jun 2008 11:43:18 -0500
> From: DWUTKA at marlow.com
> To: accessd at databaseadvisors.com
> Subject: Re: [AccessD] Form BeforeUpdate
>
> Nope. Not sure what happened there...brain fart?
>
> Drew
>
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust
> Sent: Tuesday, June 24, 2008 11:01 AM
> To: Access Developers discussion and problem solving
> Subject: Re: [AccessD] Form BeforeUpdate
>
> Um, is this the right thread, Drew?
>
> Charlotte
>
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Drew Wutka
> Sent: Tuesday, 24 June 2008 8:25 a.m.
> To: Access Developers discussion and problem solving
> Subject: Re: [AccessD] Form BeforeUpdate
>
> But you couldn't run Access 97 in Windows 3.1, right? Reminds me of the volkswagon bug distributor design.
>
> Drew
>
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Mark A Matte
> Sent: Tuesday, June 24, 2008 9:48 AM
> To: Access Developers discussion and problem solving
> Subject: Re: [AccessD] Form BeforeUpdate
>
>
> I'm not sure the exact question here...but one point I see...when you click your button on the main form...your BEFORE UPDATE on the subform does not fire because you did't get to that point...you'r subform lost focus. Could you use subform.lost focus event for your validation?
>
> Mark A. Matte
>
>
>> Date: Tue, 24 Jun 2008 06:08:22 -0700
>> From: iggy at nanaimo.ark.com
>> To: accessd at databaseadvisors.com
>> Subject: Re: [AccessD] Form BeforeUpdate
>>
>> Hey Charlotte
>> Thank you.
>> But I wasn't trying to cancel the close the form per se. It was about
>> the BeforeUpdate I will try to keep this short, maybe I am doing
>> something wrong but....
>> If I simply have a bound form with 1 field "Product" and a button with
>> Msgbox 1 DoCmd.Close And on the BeforeUpdate for the form Msgbox 2
>> DoCmd.CancelEvent And I change the contents of the field. Then click
>> the button.
>> Msgbox 1 fires first (and close) and then MsgBox 2 fires (and
>> cancelevent) next and of course the form closes, which is not what you
>> want to happen, you want to show the user the validation tests failed
>> and return them to the record in the form.
>> If remove the BeforeUpDate for the form and put it in the BeforeUpdate
>> in the Product field Msgbox 2 DoCmd.CancelEvent And I change the
>> contents of the field. Then click the button.
>> Msgbox 2 fires first and the DoCmd.CancelEvent fires and I never get
>> the MsgBox 1 and the close. This is what you would expect, but I
>> didn't want to put BeforeUpdates on all my fields in a form, rather
>> one global check.
>> I know this logic, form vs control BeforeUpdate probably is due to the
>> difference between a form versus a controls actions.
>> So by using a subform I was able to run my validations using the
>> subform BeforeUpdate and a close button on the main form.
>>
>>
>> Charlotte Foust wrote:
>>
>>>I don't believe you can cancel the form's close event. You have to use
>>>the Unload event instead if you want to cancel. However, a lot depends
>>>on how your close button behaves. If it just calls close, then a
>>>CancelEvent is not going to change that. If it calls Form_Unload and
>>>the Unload event calls DoCmd.Close, then the CancelEvent should work,
>>>I think.
>>>
>>>Charlotte Foust
>>>
>>>-----Original Message-----
>>>From: accessd-bounces at databaseadvisors.com
>>>[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Tony Septav
>>>Sent: Sunday, 22 June 2008 5:38 a.m.
>>>To: Access Developers discussion and problem solving
>>>Subject: [AccessD] Form BeforeUpdate
>>>
>>>Hey All
>>>I am trying to use the BeforeUpdate on a bound continuous form. The
>>>code works and checks the data in the current record for validation
>>>and if an error is found it pops up a message and fires the
>>>docmd.cancelevent (or cancel = true).
>>>Everything works fine, except when I click on the add, delete, or
>>>close buttons (mine) in the form's footer, then the code works fine
>>>and the message pops up, but the docmd.cancelevent doesn't fire. Is
>>>this a bug, or am I missing something.
>>>--
>>>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
>
> _________________________________________________________________
> The i'm Talkathon starts 6/24/08.  For now, give amongst yourselves.
> http://www.imtalkathon.com?source=TXT_EML_WLH_LearnMore_GiveAmongst
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI Business Sensitive material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited.
>
>
> --
> 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
> The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI Business Sensitive material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited.
>
>
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com

_________________________________________________________________
The i’m Talkathon starts 6/24/08.  For now, give amongst yourselves.
http://www.imtalkathon.com?source=TXT_EML_WLH_LearnMore_GiveAmongst



More information about the AccessD mailing list