# How to stop Accepted code running On Save

**URL:** <https://clarionhub.com/t/how-to-stop-accepted-code-running-on-save/1223>\
**Category:** questions\
**Tags:** clarion10\
**Created:** [June 5, 2017, 2:48am UTC](https://clarionhub.com/t/how-to-stop-accepted-code-running-on-save/1223 "2017-06-05T02:48:04Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![StuAndrews](https://clarionhub.com/letter_avatar_proxy/v4/letter/s/76d3ee/32.png) [@StuAndrews](https://clarionhub.com/u/StuAndrews)\
**Post date:** [June 5, 2017, 2:48am UTC](https://clarionhub.com/t/how-to-stop-accepted-code-running-on-save/1223/1 "2017-06-05T02:48:04Z")

</div>

Hi Folks,

Has been a long time since I’ve working in Not-Nettalk Clarion, ha!

Clarion 10.

So I’ve got some code in an Accepted embed for a field on a file form.

The code is running when the “Save” button is clicked.

If this were Nettalk, I’d add a little check wrap around the code. And from the dim dark memory palace there is something similar to do here right?

Q. How do I stop Accepted field embed code running On Save?

---

<div class="post-metadata">

**Author:** ![brahn](https://clarionhub.com/user_avatar/clarionhub.com/brahn/32/756_2.png) [@brahn](https://clarionhub.com/u/brahn)\
**Post date:** [June 5, 2017, 3:00am UTC](https://clarionhub.com/t/how-to-stop-accepted-code-running-on-save/1223/2 "2017-06-05T03:00:08Z")

</div>

I think you are after:

```auto
IF 0{PROP:AcceptAll}=FALSE
  ! do some code stuff here that only runs when the 
  ! button is clicked, not when the window is doing AcceptAll mode shenanigans
END

```

---

<div class="post-metadata">

**Author:** ![StuAndrews](https://clarionhub.com/letter_avatar_proxy/v4/letter/s/76d3ee/32.png) [@StuAndrews](https://clarionhub.com/u/StuAndrews)\
**Post date:** [June 5, 2017, 3:01am UTC](https://clarionhub.com/t/how-to-stop-accepted-code-running-on-save/1223/3 "2017-06-05T03:01:05Z")

</div>

Champion! That’s the one.

---

<div class="post-metadata">

**Author:** ![Rick\_UpperPark](https://clarionhub.com/user_avatar/clarionhub.com/rick_upperpark/32/346_2.png) [@Rick\_UpperPark](https://clarionhub.com/u/Rick_UpperPark)\
**Post date:** [May 29, 2018, 3:05pm UTC](https://clarionhub.com/t/how-to-stop-accepted-code-running-on-save/1223/4 "2018-05-29T15:05:29Z")

</div>

> [@brahn](#):
>
> ! do some code stuff here that only runs when the  
> ! button is clicked, not when the window is doing AcceptAll mode shenanigans

Brahn, just for completeness. Event Accepted does not fire during AcceptAll mode for **buttons**.

---

<div class="post-metadata">

**Author:** ![brahn](https://clarionhub.com/user_avatar/clarionhub.com/brahn/32/756_2.png) [@brahn](https://clarionhub.com/u/brahn)\
**Post date:** [May 30, 2018, 2:43am UTC](https://clarionhub.com/t/how-to-stop-accepted-code-running-on-save/1223/5 "2018-05-30T02:43:13Z")

</div>

Rick, YES!

My comment was quite badly worded. I would edit it but then your post would look weird 😃

Maybe more like this:

```auto
IF 0{PROP:AcceptAll}=FALSE
  ! do some code stuff here that only runs when the 
  ! field EVENT:Accepted fires from user interaction, not when the window is doing AcceptAll mode shenanigans
END

```
