Results 1 to 3 of 3
  1. #1
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Alzano Lombardo, Italy
    Posts
    1,483
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Automatically Detect If a Form Is Being Edited (2000)

    I'm trying out this article in Microsoft Knowledge Base.
    What I don't understand is the purpose of [Form].[Dirty] in <font color=red>step 2</font color=red> of Method 2:
    <font color=red>Add a new text box with the following properties to the form:
    Name: txtEditModeChange
    ControlSource: =[Form].[Dirty] & EditModeChange([Form])
    Visible: No</font color=red>

    Why not just use
    <font color=448800>ControlSource: = EditModeChange([Form])</font color=448800> ?

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 28 Times in 28 Posts

    Re: Automatically Detect If a Form Is Being Edited (2000)

    If you leave out [Form].[Dirty], you will find that the state of the command button is not updated correctly. By including [Form].[Dirty] in the control source of the text box, you force the value of the text box to be updated if the value of Dirty changes. This forces the function EditModeChange to be executed, since it is part of the control source too. Without [Form].[Dirty], the text box would not be updated and hence the function EditModeChange would not be executed.

  3. #3
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Alzano Lombardo, Italy
    Posts
    1,483
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Automatically Detect If a Form Is Being Edited (2000)

    Thank you Hans, punctual and clear as usual.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •