Kevin,
if there are no changes, form BeforeUpdate won't be triggered
~crystal
On 2/15/2019 6:05 AM, qingqinga@yahoo.com [MS_Access_Professionals] wrote:
> Dear Duane,
> I use it behind a before update event. It meant to detect if there's any changes made. if there is, then some fields will be updated to another table. If there isn't, the doing nothing and close the form.Here's the code:
>
> On Error GoTo ErrHandle
>
> If Me.dirty=True
> Call Me.Command455_Click
> End If
>
> ErrExit:
> Exit Sub
>
> ErrHandle:
> Resume ErrExit
>
> Best Regards,
> Kevin
>
> --------------------------------------------
> On Fri, 2/15/19, Duane Hookom duanehookom@hotmail.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:
>
> Subject: Re: Re:[MS_AccessPros] Re: How to detect if there's any changes in forms.
> To: "MS_Access_Professionals@yahoogroups.com" <MS_Access_Professionals@yahoogroups.com>
> Date: Friday, February 15, 2019, 4:29 AM
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> Kevin,
>
> How did you use the
> code?
>
> What are you using to call the
> code?
>
> Is the record actually
> edited?
>
> Can you share more than just a
> single line that doesn't provide any
> context?
>
>
>
>
>
>
> Duane
>
>
>
>
>
>
>
> From:
> MS_Access_Professionals@yahoogroups.com
> <MS_Access_Professionals@yahoogroups.com> on behalf of
> qingqinga qingqinga@yahoo.com [MS_Access_Professionals]
> <MS_Access_Professionals@yahoogroups.com>
>
> Sent: Thursday, February 14, 2019 1:33 PM
>
> To: MS_Access_Professionals@yahoogroups.com
>
> Subject: Re:[MS_AccessPros] Re: How to detect if
> there's any changes in forms.
>
>
>
> Dear,
>
>
> I tried 'If Me.Dirty Then'. After
> running the code, nothing happens. What could be wrong?
>
>
> Best Regards,
>
>
> Kevin
>
>
>
>
>
>
> 发自 WPS邮箱客戶端
>
> 在
> "yaccri@bezeqint.net [MS_Access_Professionals]"
> <MS_Access_Professionals@yahoogroups.com>,2019年2月14日
> 23:44写道:
>
>
>
>
>
>
>
>
> Did you
> check the Dirty flag?
> You can take a look at:
> https://docs.microsoft.com/en-us/office/vba/api/access.form.dirty(property)
>
>
>
>
>
> You can also use the 'On Dirty' method
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> #yiv7093477761 #yiv7093477761 --
> #yiv7093477761ygrp-mkp {
> border:1px solid #d8d8d8;font-family:Arial;margin:10px
> 0;padding:0 10px;}
>
> #yiv7093477761 #yiv7093477761ygrp-mkp hr {
> border:1px solid #d8d8d8;}
>
> #yiv7093477761 #yiv7093477761ygrp-mkp #yiv7093477761hd {
> color:#628c2a;font-size:85%;font-weight:700;line-height:122%;margin:10px
> 0;}
>
> #yiv7093477761 #yiv7093477761ygrp-mkp #yiv7093477761ads {
> margin-bottom:10px;}
>
> #yiv7093477761 #yiv7093477761ygrp-mkp .yiv7093477761ad {
> padding:0 0;}
>
> #yiv7093477761 #yiv7093477761ygrp-mkp .yiv7093477761ad p {
> margin:0;}
>
> #yiv7093477761 #yiv7093477761ygrp-mkp .yiv7093477761ad a {
> color:#0000ff;text-decoration:none;}
> #yiv7093477761 #yiv7093477761ygrp-sponsor
> #yiv7093477761ygrp-lc {
> font-family:Arial;}
>
> #yiv7093477761 #yiv7093477761ygrp-sponsor
> #yiv7093477761ygrp-lc #yiv7093477761hd {
> margin:10px
> 0px;font-weight:700;font-size:78%;line-height:122%;}
>
> #yiv7093477761 #yiv7093477761ygrp-sponsor
> #yiv7093477761ygrp-lc .yiv7093477761ad {
> margin-bottom:10px;padding:0 0;}
>
> #yiv7093477761 #yiv7093477761actions {
> font-family:Verdana;font-size:11px;padding:10px 0;}
>
> #yiv7093477761 #yiv7093477761activity {
> background-color:#e0ecee;float:left;font-family:Verdana;font-size:10px;padding:10px;}
>
> #yiv7093477761 #yiv7093477761activity span {
> font-weight:700;}
>
> #yiv7093477761 #yiv7093477761activity span:first-child {
> text-transform:uppercase;}
>
> #yiv7093477761 #yiv7093477761activity span a {
> color:#5085b6;text-decoration:none;}
>
> #yiv7093477761 #yiv7093477761activity span span {
> color:#ff7900;}
>
> #yiv7093477761 #yiv7093477761activity span
> .yiv7093477761underline {
> text-decoration:underline;}
>
> #yiv7093477761 .yiv7093477761attach {
> clear:both;display:table;font-family:Arial;font-size:12px;padding:10px
> 0;width:400px;}
>
> #yiv7093477761 .yiv7093477761attach div a {
> text-decoration:none;}
>
> #yiv7093477761 .yiv7093477761attach img {
> border:none;padding-right:5px;}
>
> #yiv7093477761 .yiv7093477761attach label {
> display:block;margin-bottom:5px;}
>
> #yiv7093477761 .yiv7093477761attach label a {
> text-decoration:none;}
>
> #yiv7093477761 blockquote {
> margin:0 0 0 4px;}
>
> #yiv7093477761 .yiv7093477761bold {
> font-family:Arial;font-size:13px;font-weight:700;}
>
> #yiv7093477761 .yiv7093477761bold a {
> text-decoration:none;}
>
> #yiv7093477761 dd.yiv7093477761last p a {
> font-family:Verdana;font-weight:700;}
>
> #yiv7093477761 dd.yiv7093477761last p span {
> margin-right:10px;font-family:Verdana;font-weight:700;}
>
> #yiv7093477761 dd.yiv7093477761last p
> span.yiv7093477761yshortcuts {
> margin-right:0;}
>
> #yiv7093477761 div.yiv7093477761attach-table div div a {
> text-decoration:none;}
>
> #yiv7093477761 div.yiv7093477761attach-table {
> width:400px;}
>
> #yiv7093477761 div.yiv7093477761file-title a, #yiv7093477761
> div.yiv7093477761file-title a:active, #yiv7093477761
> div.yiv7093477761file-title a:hover, #yiv7093477761
> div.yiv7093477761file-title a:visited {
> text-decoration:none;}
>
> #yiv7093477761 div.yiv7093477761photo-title a,
> #yiv7093477761 div.yiv7093477761photo-title a:active,
> #yiv7093477761 div.yiv7093477761photo-title a:hover,
> #yiv7093477761 div.yiv7093477761photo-title a:visited {
> text-decoration:none;}
>
> #yiv7093477761 div#yiv7093477761ygrp-mlmsg
> #yiv7093477761ygrp-msg p a span.yiv7093477761yshortcuts {
> font-family:Verdana;font-size:10px;font-weight:normal;}
>
> #yiv7093477761 .yiv7093477761green {
> color:#628c2a;}
>
> #yiv7093477761 .yiv7093477761MsoNormal {
> margin:0 0 0 0;}
>
> #yiv7093477761 o {
> font-size:0;}
>
> #yiv7093477761 #yiv7093477761photos div {
> float:left;width:72px;}
>
> #yiv7093477761 #yiv7093477761photos div div {
> border:1px solid
> #666666;min-height:62px;overflow:hidden;width:62px;}
>
> #yiv7093477761 #yiv7093477761photos div label {
> color:#666666;font-size:10px;overflow:hidden;text-align:center;white-space:nowrap;width:64px;}
>
> #yiv7093477761 #yiv7093477761reco-category {
> font-size:77%;}
>
> #yiv7093477761 #yiv7093477761reco-desc {
> font-size:77%;}
>
> #yiv7093477761 .yiv7093477761replbq {
> margin:4px;}
>
> #yiv7093477761 #yiv7093477761ygrp-actbar div a:first-child {
> margin-right:2px;padding-right:5px;}
>
> #yiv7093477761 #yiv7093477761ygrp-mlmsg {
> font-size:13px;font-family:Arial, helvetica, clean,
> sans-serif;}
>
> #yiv7093477761 #yiv7093477761ygrp-mlmsg table {
> font-size:inherit;font:100%;}
>
> #yiv7093477761 #yiv7093477761ygrp-mlmsg select,
> #yiv7093477761 input, #yiv7093477761 textarea {
> font:99% Arial, Helvetica, clean, sans-serif;}
>
> #yiv7093477761 #yiv7093477761ygrp-mlmsg pre, #yiv7093477761
> code {
> font:115% monospace;}
>
> #yiv7093477761 #yiv7093477761ygrp-mlmsg * {
> line-height:1.22em;}
>
> #yiv7093477761 #yiv7093477761ygrp-mlmsg #yiv7093477761logo {
> padding-bottom:10px;}
>
>
> #yiv7093477761 #yiv7093477761ygrp-msg p a {
> font-family:Verdana;}
>
> #yiv7093477761 #yiv7093477761ygrp-msg
> p#yiv7093477761attach-count span {
> color:#1E66AE;font-weight:700;}
>
> #yiv7093477761 #yiv7093477761ygrp-reco
> #yiv7093477761reco-head {
> color:#ff7900;font-weight:700;}
>
> #yiv7093477761 #yiv7093477761ygrp-reco {
> margin-bottom:20px;padding:0px;}
>
> #yiv7093477761 #yiv7093477761ygrp-sponsor #yiv7093477761ov
> li a {
> font-size:130%;text-decoration:none;}
>
> #yiv7093477761 #yiv7093477761ygrp-sponsor #yiv7093477761ov
> li {
> font-size:77%;list-style-type:square;padding:6px 0;}
>
> #yiv7093477761 #yiv7093477761ygrp-sponsor #yiv7093477761ov
> ul {
> margin:0;padding:0 0 0 8px;}
>
> #yiv7093477761 #yiv7093477761ygrp-text {
> font-family:Georgia;}
>
> #yiv7093477761 #yiv7093477761ygrp-text p {
> margin:0 0 1em 0;}
>
> #yiv7093477761 #yiv7093477761ygrp-text tt {
> font-size:120%;}
>
> #yiv7093477761 #yiv7093477761ygrp-vital ul li:last-child {
> border-right:none !important;
> }
> #yiv7093477761
>
>
>
> ------------------------------------
> Posted by: <zhao.liqing@yahoo.com>
> ------------------------------------
>
>
> ------------------------------------
>
> Yahoo Groups Links
>
>
>
Posted by: qingqinga <qingqinga@yahoo.com>
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (10) |
Tidak ada komentar:
Posting Komentar