+ Reply to Thread
Page 3 of 3 FirstFirst 1 2 3
Results 21 to 25 of 25

Thread: VBA Requery Problems

  1. #21
    Barn Regular nboscaino is an unknown quantity at this point nboscaino's Avatar
    Join Date
    Jul 2008
    Location
    Philadelphia, PA
    Posts
    97
    Rep Power
    4

    Thank you so much for all that. Ill check it all out now.

  2. #22
    Barn Regular nboscaino is an unknown quantity at this point nboscaino's Avatar
    Join Date
    Jul 2008
    Location
    Philadelphia, PA
    Posts
    97
    Rep Power
    4

    Ok Now I am really confused. Thank you for all your work but I still have not learned anything. Please explain to me what you wrote. This is almost totally different from what we have been discussing. I am really trying to learn VBA so I can use it when I need it. This wont be an isolated problem.

    Private Sub CHIncome_LostFocus()

    If Me.Dirty Then Me.Dirty = False
    Me.Parent.Qry180ExpIncDailyNet.Form.Requery

    End Sub


    1. I still dont know what ME means.
    2. I dont know what dirty means
    3. Why am I using an if then statement now
    4. Me.Parent.Qry180ExpIncDailyNet.Form.Requery <----- cant i just write that by itself

  3. #23
    Barn Newbie RuralGuy will become famous soon enough RuralGuy's Avatar
    Join Date
    Mar 2008
    Posts
    44
    Rep Power
    4

    If Me.Dirty is TRUE when any bound control has been changed.
    THEN Me.Dirty = False simply saves the record
    If Me.Dirty Then Me.Dirty = False is a single line If...Then statement. It is just like
    Code:
    If Me.Dirty = True Then
       DoCmd.RunCommand acCmdSaveRecord
    End If
    
    The ME in this case is referring to the form where the code resides (FmCheckingEntry) And Me.Parent is referencing the MainForm on which the SubForm resides (Master).

  4. #24
    Barn Regular nboscaino is an unknown quantity at this point nboscaino's Avatar
    Join Date
    Jul 2008
    Location
    Philadelphia, PA
    Posts
    97
    Rep Power
    4

    ok so you are suggesting that I use this statement instead then? I am guessing that me.dirty=true means that "this object has not recorded the new value yet." Am I right in my understanding?

  5. #25
    Barn Newbie RuralGuy will become famous soon enough RuralGuy's Avatar
    Join Date
    Mar 2008
    Posts
    44
    Rep Power
    4

    The Dirty property is True when a bound control has been changed and the value has not yet been written back to the table. As you will find, there seems to always be several ways in Access to accomplish the same thing. Pick whatever method you are comfortable with.

+ Reply to Thread
Page 3 of 3 FirstFirst 1 2 3

Bookmarks

Posting Permissions

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

SEO by vBSEO