Results 1 to 4 of 4
  1. #1
    DanT is offline Novice
    Windows 11 Office 365
    Join Date
    Sep 2022
    Posts
    23

    'if dirty' macro

    Hi there,



    Would someone please help me with constructing statement in macro editor (not vba)

    if record is dirty then <action>
    else <some other action>

    I have 'if' statement and I have my actions in place. I couldn't find 'else' statement though, and I don't know how to construct logical phrase for 'record is dirty'. All I found was [Dirty] property but I don't know how to use it.

  2. #2
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 10 Access 2016
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,530
    What is your objection to using vba?
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  3. #3
    moke123's Avatar
    moke123 is offline Me.Dirty=True
    Windows 11 Office 365
    Join Date
    Oct 2012
    Location
    Ma.
    Posts
    1,643
    I couldn't find 'else' statement though
    Look on the right hand side.
    Click image for larger version. 

Name:	ifelse.png 
Views:	15 
Size:	9.9 KB 
ID:	49032

    Much easier in vba
    Code:
    If me.Dirty then
    ---
       Else
    ---
    End if
    If this helped, please click the star * at the bottom left and add to my reputation- Thanks

  4. #4
    DanT is offline Novice
    Windows 11 Office 365
    Join Date
    Sep 2022
    Posts
    23
    Quote Originally Posted by Bob Fitz View Post
    What is your objection to using vba?
    Generally nothing. In this case it will be just more difficult for me to execute actions when conditions are met.

    What I try to do is

    if me.dirty then
    -reset all the changes
    -close form
    -open another form
    else
    -close form
    -open another form

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 26
    Last Post: 11-19-2021, 08:06 AM
  2. On Dirty Propery
    By lonesoac0 in forum Forms
    Replies: 5
    Last Post: 05-16-2016, 08:24 PM
  3. me.dirty
    By slimjen in forum Forms
    Replies: 2
    Last Post: 03-28-2013, 01:51 PM
  4. On Dirty fires but Me.Dirty = False (v2010)
    By Rod in forum Programming
    Replies: 5
    Last Post: 07-30-2011, 08:42 PM
  5. Dirty
    By JEPEDEWE in forum Programming
    Replies: 1
    Last Post: 11-13-2010, 04:50 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums